Skip to content

Checkbox

This component generates a checkbox field to be used in the author dialog. The checkbox field’s value is passed to the component as a prop.

Properties

PropertyTypeDescriptionDefault ValueRequired
labelstringThe label of the checkbox componentYes
tooltipstringTooltip text for the checkbox fieldNo
showastogglebooleanWhether to show the checkbox as a toggle switchfalseNo
defaultValuebooleanDefault value for the checkbox componentNo

Example

To use a checkbox component in the author dialog, we can use the following code:

{
checkbox: checkbox({
label: 'Checkbox',
tooltip: 'The checkbox of the component',
showastoggle: true,
defaultValue: false,
})
}

Output Type

type CheckBoxOutputType = boolean;

Example in author dialog

Checkbox Component