Capítulo 38 de 51
A non-filterable (keyboard-typeahead only) listbox select whose popup, by default, overlaps the trigger so the selected item's text lines up exactly with the trigger's displayed value (alignItemWithTrigger) — the single most distinctive and easy-to-misconfigure behavior in the component.
Root → Label, Trigger (Value, Icon), Portal → Backdrop, Positioner → Popup (ScrollUpArrow, Arrow, List → Item → ItemText/ItemIndicator, Separator, Group → GroupLabel, ScrollDownArrow).alignItemWithTrigger (default true): makes the popup overlap the trigger so the selected item aligns with the trigger's value text — data-side="none" on Popup/Positioner while this mode is active. Falls back to standard positioning automatically when: opened via touch, insufficient viewport space (tune the threshold via min-height on Positioner), or the trigger sits within 20px of the top/bottom viewport edge. All other positioning props (side, align, ...) are ignored while this mode is active — set alignItemWithTrigger={false} if you need side/align to take effect.multiple prop on Root.ScrollUpArrow/ScrollDownArrow replace a generic scrollbar for long option lists inside the popup, with data-visible reflecting whether more content exists in that direction.Select.Label; fall back to aria-label on Trigger only when no visible label renders.| Part | Notable props | Notable data attributes |
|---|---|---|
Root | value/onValueChange, multiple, items, isItemEqualToValue, itemToStringLabel/itemToStringValue, modal | — |
Positioner | alignItemWithTrigger (default true), side/align (ignored while active) | data-side="none" when overlap mode active |
Item | label, value, disabled | data-selected, data-highlighted, data-disabled |
ScrollUpArrow/ScrollDownArrow | keepMounted | data-direction, data-visible, data-starting-style/data-ending-style |
side/align prop appears to have no effect, check alignItemWithTrigger first — it's true by default and silently overrides normal positioning until it falls back or is disabled.alignItemWithTrigger={false} explicitly for any select whose popup must never overlap the trigger (e.g. a compact toolbar select where overlap looks broken) rather than fighting the automatic fallback conditions.ScrollUpArrow/ScrollDownArrow.