Skip to content

Select

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

Properties

PropertyTypeDescriptionDefault ValueRequired
labelstringThe label of the select componentYes
placeholderstringPlaceholder text for the select fieldNo
tooltipstringTooltip text for the select fieldNo
valuesarrayArray of options for the select fieldYes
defaultValuestringDefault value for the select componentNo
multiplebooleanAllows multiple selectionsfalseNo

Example

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

{
category: select({
label: 'Category',
placeholder: 'Select a category',
tooltip: 'The category of the component',
values: [
{ value: 'option1', label: 'Option 1' },
{ value: 'option2', label: 'Option 2' },
],
defaultValue: 'option1',
multiple: false,
})
}

Example in author dialog

Select Component Select Component