Select
Displays a list of options for the user to pick from—triggered by a button.
The on_open_change
event handler acts in a similar way to the on_change
and is called when the open state of the select changes.
Submitting a form using select
The name
prop is needed to submit with its owning form as part of a name/value pair.
When the required
prop is True
, it indicates that the user must select a value before the owning form can be submitted.
Example Form
Results:
{}API Reference
rx.select.trigger
The button that toggles the select.
Event Triggers
See the full list of default event triggersrx.select.group
Used to group multiple items.
Props
No component specific props
Event Triggers
See the full list of default event triggersrx.select.item
The component that contains the select items.
Event Triggers
See the full list of default event triggersrx.select.label
Used to render the label of a group, it isn't focusable using arrow keys.
Props
No component specific props
Event Triggers
See the full list of default event triggersrx.select.separator
Used to visually separate items in the Select.
Props
No component specific props