Skip to main content Skip to complementary content

Check box property definition

Information noteSTABLE.

This API is reliable and breaking changes are unlikely.

Fields

The check box definition property template can be used to add a custom property of check box type. When defining a check box property, the following fields can be used:

type

This field is mandatory and should always be "boolean" for a check box property type definition.

label

Used for defining the label that is displayed in the property panel.

ref

Name or ID used to reference a property.

defaultValue

Used for defining the default value of your custom property.

Examples

Defining a custom property of check box type can look like below.

Example: Add custom check box property to Appearance accordion

Information noteCustomization of properties always start with items:.
	return {
		type: "items",
		component: "accordion",
		items: {
		settings: {
				uses: "settings",
				items: {
					MyCheckProp: {
						type: "boolean",
						label: "Show me",
						ref: "myproperties.show",
						defaultValue: true
					}
				}
			}
This is what it looks like in the property panel

An interface titled "MyNewExtension" with the subtitle "Appearance". There are two hide and show buttons. They are called "General" and "Show me". The hide and show button called "Show me" is open and contains a checkbox that is checked. The text beside the check is "Show me".

You can also define a new accordion item as a check-box property.

Example: Add custom check-box property as a new accordion item

	return {
		type: "items",
		component: "accordion",
		items: {
			MyAccordion: {
				type: "boolean",
				label: "Show me",
				ref: "myproperties.show",
				defaultValue: true
			}
This is what it looks like in the property panel

An interface titled "MyNewExtension" with the subtitle "Show me". Under the subtitle "Show me", there is a check box that is checked off with the text "Show me" beside it.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!