For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • Overview
  • Learning Plans
    • Developer Foundations
    • Composable Developer
    • Stencil Developer
    • B2B Developer
  • Courses
        • The Makeswift Approach
        • Controls
        • Checklist
        • Best Practices
      • Conclusion
    • Learning Changelog
Dev Portal
LogoLogo
On this page
  • Simplify Component Structure
  • Evaluate Props Schema
  • Implement the Makeswift Registration File
  • Import the Component Registration
  • Add Controls for All Props
CoursesMakeswift CoreModule 3: Building Components

Component Conversion Checklist

Was this page helpful?
Previous

Component Controls

Next

Best Practices

Built with

Plan: Composable Developer

Lesson 12 of 21 · 15 min

Now that you understand the structure of Makeswift-enabled components, review the following common steps to consider when converting any React component to be compatible with the visual editor.

Simplify Component Structure

To serve as an effective building block in the visual editor, a piece of presentation needs to have a single component as its “entry point.”

If using your React UI requires implementors directly to use multiple components, such as an Accordion component in combination with AccordionItem components, you might consider wrapping this in a component that orchestrates these together based on a single set of props.

Your UI may be split into multiple components internally, but the “top level” implementation should be a single component with props.

Evaluate Props Schema

Evaluate the types and schema of your component’s props to make sure they can map well to available Makeswift controls.

Implement the Makeswift Registration File

Create the registration file for your component, calling runtime.registerComponent with the appropriate configuration.

Import the Component Registration

In the location where component registrations are imported, add the import of your own component.

By default, new imports should be added in lib/makeswift/components.ts.

Add Controls for All Props

For each prop that your component accepts, identify the appropriate Makeswift control type and add an item to the props object in the registration file.

The key of each item in props should exactly match the prop from the React component, and the value should be a new instance of a control type, with any appropriate configuration options.