ShapePropertyDefinition
Defines a single configurable property exposed by a shape.
Properties
booleanLabels?
optionalbooleanLabels: [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?
optionaldefaultValue:any
The default value for this property if it hasn't been explicitly set.
description?
optionaldescription:string
Optional description or tooltip to help the user understand what this property does.
editor?
optionaleditor:"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).
id
id:
string
The internal variable name used in the template (e.g., "backgroundColor", "width").
label
label:
string
The human-readable name to display in the inspector UI (e.g., "Background Color").
max?
optionalmax:number
For "number" types, optional max constraints.
min?
optionalmin:number
For "number" types, optional min constraints.
type
type:
ShapePropertyType
The 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?
optionalvalues: (string|ShapePropertyValueDefinition)[]
Optional set of values to pick current value from