Displays a list of options for the user to pick from—triggered by a button.
The button that toggles the select. This component inherits props from the Select primitive Trigger and Value parts. It supports common margin props.
The component that pops out when the select is open. It inherits props from the Select.Portal primitive and Select.Content primitive parts.
The component that contains the select items. It inherits props from the Select.Item primitive part.
Used to group multiple items. It inherits props from the Select.Group primitive part. Use in conjunction with Select.Label
to ensure good accessibility via automatic labelling.
Used to render the label of a group, it isn’t focusable using arrow keys. It inherits props from the Select.Label primitive part.
Used to visually separate items in the Select. It inherits props from the Select.Separator primitive part.
Use the size
prop to control the size.
Use the ghost
trigger variant to render the trigger without a visually containing element. Ghost triggers behave differently in layout as they use a negative margin to optically align themselves against their siblings while maintaining their padded active and hover states.
When using server-side rendering, you might notice a layout shift after hydration. This is because Trigger executes client-side code to display the selected item’s text. To avoid that layout shift, you can render it manually by mapping values.