Zephora UI

Form

Select

Single-value select following the ARIA combobox pattern: a button trigger opens a portal listbox with typeahead, keyboard navigation and an optional clear button.

Import

import { Select } from "@zephora/react";

Examples

Basic

Controlled with clear

`clearable` shows a clear button when a value is selected.

Value: utc

Sizes and invalid

Grouped with descriptions

Options sharing a `group` render under a non-interactive header; `description` adds secondary text under the label.

API

Select props

PropTypeDefaultDescription
options *SelectOption[]Options shown in the listbox. Plain { label, value } arrays keep working — see the SelectOption table for the extended fields.
valuestringControlled selected value ("" = nothing selected).
defaultValuestringInitial value in uncontrolled mode.
onValueChange(value: string) => voidCalled with the newly selected value.
placeholderstring"Select…"Text shown when nothing is selected.
size"sm" | "md" | "lg""md"Trigger scale.
invalidbooleanfalseMarks the trigger invalid (aria-invalid).
disabledbooleanfalseDisables the trigger.
clearablebooleanfalseShows a clear button when a value is selected.
loadingbooleanfalseShows a spinner row in the popup and sets aria-busy on the listbox.
renderOption(option: SelectOption, state: { selected, active }) => ReactNodeCustom option renderer — replaces the default icon/label/description layout.
renderValue(selected: SelectOption) => ReactNodeCustom trigger value renderer for the selected option.
aria-label / aria-labelledbystringAccessible name for the trigger and listbox.
unstyledbooleanfalseHeadless mode — drops Zephora classes so your own CSS can style it.
…restHTMLAttributes<HTMLDivElement>Forwarded to the root wrapper element.

SelectOption (shared by Select, Combobox, MultiSelect) props

PropTypeDefaultDescription
label *ReactNodeOption content. Provide textValue when this is not a plain string.
value *stringUnique option value.
disabledbooleanDisables the option.
iconReactNodeLeading visual rendered before the label.
descriptionReactNodeSecondary text rendered under the label.
groupstringOptions sharing a group render under a non-interactive group header.
textValuestringPlain-text used for filtering/typeahead when label is not a string.

Keyboard

KeyAction
Enter / Space / Arrow Down / Arrow UpOpens the listbox from the trigger.
Arrow Down / Arrow UpMoves the active option (skips disabled).
Home / EndMoves to the first / last enabled option.
Enter / SpaceSelects the active option and closes.
EscapeCloses the listbox without selecting.
A-ZTypeahead — jumps to the next option starting with the typed text.