Introducing PrimeReact v11-alpha 🎉Discover Now

Select

An unstyled select dropdown component with keyboard navigation, filtering, and single or multiple selection.

Build fully custom select dropdowns with complete control over layout and styling.

basic-demo

Pre-styled Versions

Choose a pre-styled library to use Select with ready-made designs.
For hook-based usage without components, see the Headless API.

Features#

  • Compound component API with sub-components: Root, Trigger, Value, Indicator, Clear, Portal, Positioner, Popup, List, Option, OptionIndicator, Filter, Arrow, Header, Footer, Empty
  • Single and multiple selection with keyboard focus cycling
  • Built-in filter input integration for searchable dropdowns
  • Option grouping with group header rendering

Usage#

import { Select } from 'primereact/select';
<Select.Root>
    <Select.Trigger>
        <Select.Value />
        <Select.Clear />
        <Select.Indicator />
    </Select.Trigger>
    <Select.Portal>
        <Select.Positioner>
            <Select.Popup>
                <Select.Arrow />
                <Select.Header>
                    <Select.Filter />
                </Select.Header>
                <Select.List>
                    <Select.Option>
                        <Select.OptionIndicator />
                    </Select.Option>
                </Select.List>
                <Select.Empty />
                <Select.Footer />
            </Select.Popup>
        </Select.Positioner>
    </Select.Portal>
</Select.Root>

Behavior#

Motion Animation#

<Select.Popup motionProps={{ name: 'p-select' }}>...</Select.Popup>

See Motion for animation phases, CSS variables, and hide strategies.

Polymorphic Rendering#

Use as on any sub-component to change the rendered HTML element.

<Select.Root as="section">
    <Select.Trigger as="div">...</Select.Trigger>
</Select.Root>

Render Function Children#

Select.List accepts a render function as children, providing access to the component instance for custom option rendering.

<Select.List>
    {(instance) =>
        instance.options?.map((option, index) => (
            <Select.Option key={index} index={index}>
                {instance.listbox?.getOptionLabel(option)}
            </Select.Option>
        ))
    }
</Select.List>

Pass Through#

Some parts may not be visible in the preview depending on the component's current state.

Loading...
/* Select a part to see its CSS selector for custom styling */

API#

SelectRoot#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectRootInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectRootInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectRootInstance
The instance to pass to the component.
ptSafeRecord<SelectRootPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectRootInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
valueunknown
The current selected value of the select.
defaultValueunknown
The default selected value when used in uncontrolled mode.
defaultFilterValuestring
The default filter text value when used in uncontrolled mode.
openboolean
Controlled open state of the select overlay.
defaultOpenboolean
Default open state for uncontrolled mode.
optionsunknown[]
An array of options to display.
optionKeystring
Unique key for each option.
optionLabelstring
Label field for each option.
optionValuestring
Value field for each option.
optionDisabledstring
Field to check if an option is disabled.
optionGroupLabelstring
Label field for option groups.
optionGroupChildrenstring
Field that contains the children options in a group.
localestring
The locale to use for localization.
autoOptionFocusboolean
When enabled, the focused option is automatically highlighted.
selectOnFocusboolean
When enabled, the focused option is automatically selected.
focusOnHoverboolean
When enabled, the focused option changes on hover.
metaKeySelectionboolean
When enabled, requires holding the meta key to select/deselect.
filterboolean
When enabled, displays a filter input in the dropdown.
filterMatchMode"endsWith" | "startsWith" | "contains" | "equals"
Defines how the filter should match options.
appendTo"body" | HTMLElement | "self"
A valid query selector or an HTMLElement to specify where the overlay gets attached.
tabIndexnumber
Index of the element in tabbing order.
ariaLabelstring
Used to define a string that labels the input element.
ariaLabelledBystring
Identifier of the underlying input element.
closeOnEscapeboolean
When enabled, the overlay closes when Escape key is pressed.
autoFocusboolean
When enabled, the overlay receives focus automatically when opened.
trappedboolean
When enabled, focus is trapped within the overlay.
onOpenChange(event: useSelectOpenChangeEvent) => void
Callback to invoke when the open state changes.
multipleboolean
When enabled, allows multiple items to be selected.
invalidboolean
When present, it specifies that the component should have invalid state style.
variant"outlined" | "filled"
Specifies the input variant of the component.
filterValuestring
fluidboolean
Spans 100% width of the container when enabled.
disabledbooleanfalse
When present, it specifies that the element should be disabled.
size"small" | "large"
Defines the size of the component.
onValueChange(event: SelectValueChangeEvent) => void
Callback fired when the select's value is changed.
onFilterValueChange(event: SelectFilterValueChangeEvent) => void
Callback fired when the select's filter value is changed.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"select"
data-part"root"

Defines passthrough(pt) options of Select component.

labeltypedescription
rootSelectRootPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.
triggerSelectRootPassThroughType<HTMLAttributes<HTMLSpanElement>>Used to pass attributes to the trigger's DOM element.
valueSelectRootPassThroughType<HTMLAttributes<HTMLSpanElement>>Used to pass attributes to the value's DOM element.
clearIconSelectRootPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the clear icon's DOM element.
iconSelectRootPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the icon's DOM element.
positionerSelectRootPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the positioner's DOM element.
panelSelectRootPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the panel's DOM element.
filterSelectRootPassThroughType<HTMLAttributes<HTMLInputElement>>Used to pass attributes to the filter's DOM element.
listSelectRootPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the list's DOM element.
optionsSelectRootPassThroughType<HTMLAttributes<HTMLUListElement>>Used to pass attributes to the options' DOM element.
optionSelectRootPassThroughType<HTMLAttributes<HTMLLIElement>>Used to pass attributes to the option's DOM element.
selectionSelectRootPassThroughType<HTMLAttributes<HTMLElement>>Used to pass attributes to the selection's DOM element.
headerSelectRootPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the header's DOM element.
footerSelectRootPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the footer's DOM element.
emptySelectRootPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the empty's DOM element.

SelectTrigger#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectTriggerInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectTriggerInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectTriggerInstance
The instance to pass to the component.
ptSafeRecord<SelectTriggerPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectTriggerInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"select"
data-part"trigger"
data-positioner-openPresent when popup is open

Defines passthrough(pt) options of SelectTrigger component.

labeltypedescription
rootSelectTriggerPassThroughType<HTMLAttributes<HTMLSpanElement>>Used to pass attributes to the root's DOM element.

SelectValue#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectValueInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectValueInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectValueInstance
The instance to pass to the component.
ptSafeRecord<SelectValuePassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectValueInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
placeholderstring
Placeholder text to display when no option is selected.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.

Defines passthrough(pt) options of SelectValue component.

labeltypedescription
rootSelectValuePassThroughType<HTMLAttributes<HTMLSpanElement>>Used to pass attributes to the root's DOM element.

SelectIndicator#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectIndicatorInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectIndicatorInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectIndicatorInstance
The instance to pass to the component.
ptSafeRecord<SelectIndicatorPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectIndicatorInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
match"always" | "open" | "closed"
Determines the visibility of the indicator based on the state of the select. - "open": Indicator is visible when the dropdown is open. - "closed": Indicator is visible when the dropdown is closed. - "always": Indicator is always visible.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"select"
data-part"indicator"
data-openPresent when popup is open
data-closedPresent when popup is closed

Defines passthrough(pt) options of SelectIndicator component.

labeltypedescription
rootSelectIndicatorPassThroughType<HTMLAttributes<HTMLSpanElement>>Used to pass attributes to the root's DOM element.

SelectClear#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectClearInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectClearInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectClearInstance
The instance to pass to the component.
ptSafeRecord<SelectClearPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectClearInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"select"
data-part"clear"

Defines passthrough(pt) options of SelectClear component.

labeltypedescription
rootSelectClearPassThroughType<HTMLAttributes<HTMLSpanElement>>Used to pass attributes to the root's DOM element.

SelectPortal#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
style(CSSProperties | ((instance?: PortalInstance) => CSSProperties)) & (CSSProperties | ((instance?: SelectPortalInstance) => CSSProperties))
The style to apply to the component.
className(string | ((instance?: PortalInstance) => string)) & (string | ((instance?: SelectPortalInstance) => string))
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceBaseInstance<SafeRecord<PortalProps>, unknown, HTMLElement> & { props: SafeRecord<SafeRecord<PortalProps>>; attrs: Omit<SafeRecord<SafeRecord<PortalProps>>, string | number | symbol> & Record<PropertyKey, unknown> } & { state: SafeRecord; $computedSetup: SafeRecord } & PortalExposes & Record<PropertyKey, unknown> & useComponentPTReturnType & useComponentStyleReturnType & BaseInstance<SafeRecord<SelectPortalProps>, unknown, HTMLElement> & { props: SafeRecord<SafeRecord<SelectPortalProps>>; attrs: Omit<SafeRecord<SafeRecord<SelectPortalProps>>, string | number | symbol> & Record<PropertyKey, unknown> } & { state: SafeRecord; $computedSetup: SafeRecord } & SelectPortalExposes
The instance to pass to the component.
ptPortalPassThrough & Record<PropertyKey, unknown> & SelectPortalPassThrough
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: PortalInstance) => ReactNode & (instance: SelectPortalInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
onMounted() => void
Callback function to invoke when the portal is mounted.
onUnmounted() => void
Callback function to invoke when the portal is unmounted.
elementHTMLElement | ReactNode
The element to be rendered as the portal.
elementRefRefObject<HTMLElement>
The element reference to be rendered as the portal.
appendTostring | HTMLElement | ((instance: PortalInstance) => HTMLElement)'body'
The DOM element where the portal should be appended to.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.

Defines passthrough(pt) options of SelectPortal component.

labeltypedescription
rootSelectPortalPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

SelectPositioner#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectPositionerInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectPositionerInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectPositionerInstance
The instance to pass to the component.
ptSafeRecord<SelectPositionerPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectPositionerInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
sideSideType
The side of the positioner.
alignAlignType
The align of the positioner.
sideOffsetnumber
The side offset of the positioner.
alignOffsetnumber
The align offset of the positioner.
flipboolean
Whether to flip the positioner.
shiftboolean
Whether to shift the positioner.
hideWhenDetachedboolean
Whether to hide the positioner when detached.
strategy"fixed" | "absolute"'fixed'
The positioning strategy.
boundaryHTMLElement
The boundary element that constrains the positioner placement. Used in JS fallback mode only; CSS Anchor mode uses the containing block.
anchorHTMLElement
The anchor element.
contentHTMLDivElement
The content element.
arrowHTMLDivElement
The arrow element.
autoZIndexbooleantrue
Whether to automatically manage layering.
baseZIndexnumber0
Base zIndex value to use in layering.
onPlacementChange(placement: { side: SideType; align: AlignType }) => void
Callback invoked when the actual placement changes due to flip or shift.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-side"top" | "bottom" | "left" | "right" — placement
data-align"start" | "center" | "end" — alignment

CSS Custom Properties

The positioner element exposes CSS custom properties for layout and transform control.

CSS VariableDescription
--available-heightAvailable vertical space in pixels
--available-widthAvailable horizontal space in pixels
--transform-originComputed transform origin for animations
--positioner-anchor-widthWidth of the anchor/trigger element

Defines passthrough(pt) options of SelectPositioner component.

labeltypedescription
rootSelectPositionerPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

SelectPopup#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectPopupInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectPopupInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectPopupInstance
The instance to pass to the component.
ptSafeRecord<SelectPopupPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectPopupInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
motionPropsuseMotionProps
Used to apply motion to the popup element. It accepts the same properties as useMotion hook.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"select"
data-part"popup"
data-openPresent when popup is open

Defines passthrough(pt) options of SelectPopup component.

labeltypedescription
rootSelectPopupPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

SelectFilter#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectFilterInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectFilterInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectFilterInstance
The instance to pass to the component.
ptSafeRecord<SelectFilterPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectFilterInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
placeholderstring
Placeholder text for the filter input.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"select"
data-part"filter"

Defines passthrough(pt) options of SelectFilter component.

labeltypedescription
rootSelectFilterPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.
inputSelectFilterPassThroughType<HTMLAttributes<HTMLInputElement>>Used to pass attributes to the input's DOM element.

SelectList#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectListInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectListInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectListInstance
The instance to pass to the component.
ptSafeRecord<SelectListPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectListInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-scope"select"
data-part"list"

Defines passthrough(pt) options of SelectList component.

labeltypedescription
rootSelectListPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

SelectOption#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectOptionInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectOptionInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectOptionInstance
The instance to pass to the component.
ptSafeRecord<SelectOptionPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectOptionInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
optionunknown
The option data object.
indexnumber
The index of the option in the list.
selectedboolean
Whether the option is selected.
focusedboolean
Whether the option is focused.
disabledboolean
Whether the option is disabled.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-selectedPresent when selected
data-unselectedPresent when unselected
data-focusedPresent when focused
data-disabledPresent when disabled

Defines passthrough(pt) options of SelectOption component.

labeltypedescription
rootSelectOptionPassThroughType<HTMLAttributes<HTMLLIElement>>Used to pass attributes to the root's DOM element.

SelectOptionIndicator#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectOptionIndicatorInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectOptionIndicatorInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectOptionIndicatorInstance
The instance to pass to the component.
ptSafeRecord<SelectOptionIndicatorPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectOptionIndicatorInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-selectedPresent when selected
data-unselectedPresent when unselected

Defines passthrough(pt) options of SelectOptionIndicator component.

labeltypedescription
rootSelectOptionIndicatorPassThroughType<HTMLAttributes<HTMLElement>>Used to pass attributes to the root's DOM element.

SelectHeader#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectHeaderInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectHeaderInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectHeaderInstance
The instance to pass to the component.
ptSafeRecord<SelectHeaderPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectHeaderInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.

Defines passthrough(pt) options of SelectHeader component.

labeltypedescription
rootSelectHeaderPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

SelectFooter#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectFooterInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectFooterInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectFooterInstance
The instance to pass to the component.
ptSafeRecord<SelectFooterPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectFooterInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.

Defines passthrough(pt) options of SelectFooter component.

labeltypedescription
rootSelectFooterPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

SelectEmpty#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectEmptyInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectEmptyInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectEmptyInstance
The instance to pass to the component.
ptSafeRecord<SelectEmptyPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectEmptyInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.

Defines passthrough(pt) options of SelectEmpty component.

labeltypedescription
rootSelectEmptyPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

SelectArrow#

NameTypeDefault
refRef<unknown>
The reference to the component instance.
pIfbooleantrue
Whether the component should be rendered.
styleCSSProperties | ((instance?: SelectArrowInstance) => CSSProperties)
The style to apply to the component.
classNamestring | ((instance?: SelectArrowInstance) => string)
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
The component type to render.
asChildbooleanfalse
Whether the component should be rendered as a child component.
instanceSelectArrowInstance
The instance to pass to the component.
ptSafeRecord<SelectArrowPassThrough>
The pass-through props to pass to the component.
ptOptionsPassThroughOptions
The pass-through options to pass to the component.
unstyledboolean
Whether the component should be rendered without classes.
dtunknown
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
The styles to use for the component.
render(instance: SelectArrowInstance) => ReactNode
The render function to render the component with instance access.
childrenany
The children to render. Accepts `React.ReactNode` for static content or a render function `(instance: I) => React.ReactNode` for instance access. Typed as `any` to avoid JSX type errors when used directly in templates.
[key: string]any
pt-{optionName}-*-
Pass through attributes for customizing component. For more info, see Pass Through tab.
AttributeValue
data-side"top" | "bottom" | "left" | "right" — placement
data-align"start" | "center" | "end" — alignment

CSS Custom Properties

The arrow element exposes CSS custom properties for dynamic positioning:

CSS VariableDescription
--placer-arrow-xHorizontal offset of arrow
--placer-arrow-yVertical offset of arrow
--placer-arrow-leftLeft position of arrow element
--placer-arrow-topTop position of arrow element

Defines passthrough(pt) options of SelectArrow component.

labeltypedescription
rootSelectArrowPassThroughType<HTMLAttributes<HTMLDivElement>>Used to pass attributes to the root's DOM element.

Accessibility#

Screen Reader#

Select.Root uses a combobox pattern. The trigger has role="combobox" with aria-expanded reflecting the popup visibility and aria-controls linking to the listbox. The aria-activedescendant attribute instructs screen readers which option to read during keyboard navigation. Options have role="option" with aria-selected to indicate the current selection. The clear button has an aria-label for screen reader accessibility. Decorative elements like the indicator are hidden from screen readers with aria-hidden. Provide an accessible name with aria-label, aria-labelledby, or an associated label element.

Keyboard Support#

KeyFunction
tabMoves focus to the select trigger.
enterOpens the popup when focused, selects the focused option when open.
spaceOpens the popup when focused, selects the focused option when open.
escapeCloses the popup.
arrow downOpens the popup or moves focus to the next option.
arrow upOpens the popup or moves focus to the previous option.
homeMoves focus to the first option.
endMoves focus to the last option.