Custom prop controls for the visual editor

The SDK now supports building custom prop controls, letting you create tailored editing experiences for your components.

What’s new

  • createPropControl API — Define custom input UI for component props
  • Validation support — Add client-side validation rules to your controls
  • Nested controls — Compose controls together for complex data structures

Example

1import { createPropControl } from "@makeswift/runtime";
2
3const ColorGradient = createPropControl({
4 type: "color-gradient",
5 label: "Gradient",
6 render: ({ value, onChange }) => (
7 <GradientPicker value={value} onChange={onChange} />
8 ),
9});