@@ -104,21 +104,21 @@ props. `Select.Portal` is optional.
104104
105105### ` Select.Root `
106106
107- | Prop | Type | Default | Description |
108- | --------------------------------- | ------------------------------------- | --------------------------- | -------------------------------------------------------------------- |
109- | <code >multiple</code > | <code >boolean</code > | <code >false</code > | Allow selecting several options |
110- | <code >value</code > | <code >Value \| null \| Value[ ] </code > | — | Controlled selected value; ` null ` for none, an array when ` multiple ` |
111- | <code >defaultValue</code > | <code >Value \| null \| Value[ ] </code > | — | Initial selected value (uncontrolled); an array when ` multiple ` |
112- | <code >onValueChange</code > | <code >(value) => void</code > | — | Called with the new value when the selection changes |
113- | <code >open</code > | <code >boolean</code > | — | Controlled open state |
114- | <code >defaultOpen</code > | <code >boolean</code > | <code >false</code > | Initial open state (uncontrolled) |
115- | <code >onOpenChange</code > | <code >(open: boolean) => void</code > | — | Called when the open state changes |
116- | <code >items</code > | <code >SelectItem[ ] </code > | — | ` { label, value }[] ` used to resolve the selected label early |
117- | <code >alignItemWithTrigger</code > | <code >boolean</code > | <code >true</code > | Overlay the selected item on the trigger (native-` <select> ` style) |
118- | <code >placement</code > | <code >Placement</code > | <code >'bottom-start'</code > | Placement when not aligning to the item |
119- | <code >sideOffset</code > | <code >number</code > | <code >4</code > | Gap in px (applies only when ` alignItemWithTrigger={false} ` ) |
120-
121- ` SelectItem ` is ` { label: string; value: Value } ` — disabling is done per-` Option ` .
107+ | Prop | Type | Default | Description |
108+ | --------------------------------- | -------------------------------------- | --------------------------- | -------------------------------------------------------------------- |
109+ | <code >multiple</code > | <code >boolean</code > | <code >false</code > | Allow selecting several options |
110+ | <code >value</code > | <code >Value \| null \| Value[ ] </code > | — | Controlled selected value; ` null ` for none, an array when ` multiple ` |
111+ | <code >defaultValue</code > | <code >Value \| null \| Value[ ] </code > | — | Initial selected value (uncontrolled); an array when ` multiple ` |
112+ | <code >onValueChange</code > | <code >(value) => void</code > | — | Called with the new value when the selection changes |
113+ | <code >open</code > | <code >boolean</code > | — | Controlled open state |
114+ | <code >defaultOpen</code > | <code >boolean</code > | <code >false</code > | Initial open state (uncontrolled) |
115+ | <code >onOpenChange</code > | <code >(open: boolean) => void</code > | — | Called when the open state changes |
116+ | <code >items</code > | <code >SelectItem& lt ; Value & gt ; [ ] </code > | — | ` { label, value }[] ` used to resolve the selected label early |
117+ | <code >alignItemWithTrigger</code > | <code >boolean</code > | <code >true</code > | Overlay the selected item on the trigger (native-` <select> ` style) |
118+ | <code >placement</code > | <code >Placement</code > | <code >'bottom-start'</code > | Placement when not aligning to the item |
119+ | <code >sideOffset</code > | <code >number</code > | <code >4</code > | Gap in px (applies only when ` alignItemWithTrigger={false} ` ) |
120+
121+ ` SelectItem<Value> ` is ` { label: string; value: Value } ` — disabling is done per-` Option ` .
122122
123123### ` Select.Value `
124124
@@ -129,11 +129,11 @@ props. `Select.Portal` is optional.
129129
130130### ` Select.Option `
131131
132- | Prop | Type | Default | Description |
133- | --------------------- | -------------------- | --------------------- | --------------------------------------------- |
134- | <code >value</code > | <code >unknown</code > | — (required) | The option's value, compared with ` Object.is ` |
135- | <code >label</code > | <code >string</code > | falls back to ` value ` | Display label, also used for typeahead |
136- | <code >disabled</code > | <code >boolean</code > | — | Prevent selection (stays keyboard-focusable) |
132+ | Prop | Type | Default | Description |
133+ | --------------------- | -------------------- | --------------- | --------------------------------------------- |
134+ | <code >value</code > | <code >unknown</code > | — (required) | The option's value, compared with ` Object.is ` |
135+ | <code >label</code > | <code >string</code > | ` String( value) ` | Display label, also used for typeahead |
136+ | <code >disabled</code > | <code >boolean</code > | — | Prevent selection (stays keyboard-focusable) |
137137
138138` Select.Trigger ` , ` Select.Positioner ` , and ` Select.Popup ` take no additional props beyond
139139standard HTML attributes for their default element. ` Select.Portal ` accepts ` root ` .
0 commit comments