Skip to main content
ShapePropertyDefinition
Defines a single configurable property exposed by a shape.
NameTypeDescription
booleanLabels?[string, string]Specifies the labels to use for this property if it is a boolean and you've specified you want a 'radio' or 'select' editor. You could use this, for example, to show "On/Off" or "Yes/No" labels in the UI, rather than "True/False".
defaultValue?anyThe default value for this property if it hasn't been explicitly set.
description?stringOptional description or tooltip to help the user understand what this property does.
editor?"select" | "radio"Specifies the type of UI input to use to manage the property. Only used if you have supplied values, or if the property type is "boolean" (since in that case the property's values are implicitly a list, containing true and false values).
idstringThe internal variable name used in the template (e.g., "backgroundColor", "width").
labelstringThe human-readable name to display in the inspector UI (e.g., "Background Color").
max?numberFor "number" types, optional max constraints.
min?numberFor "number" types, optional min constraints.
typeShapePropertyTypeThe data type of the property, telling the inspector which UI control to render by default. For properties that include a values array (and also properties of type boolean) you can override the choice of UI control via the editor option.
values?Array<string | ShapePropertyValueDefinition>Optional set of values to pick current value from