Params

type
Control
required

The control that determines the type and values in the array passed to your component. Can be any of the Makeswift controls.

label
string
default: "List"

Text for the panel label that appears in the Makeswift builder.

getItemLabel
(item: T) => string

A function to get the label for each list item shown in the panel. If you don’t provide a value, the control passes an undefined value to your component.

Prop type

The Link control passes an array of values based on the type control.

Examples

An array of strings

This example adds an List control to the accordionTitles prop of an Accordions component.

An array of objects

This example uses the Shape control to define the structure of the objects in the accordions array.

.makeswift.ts is a naming convention for organizing Makeswift registration code. Learn more.