Capítulo 13 de 51
A free-form text input with optional suggestion autocompletion — unlike Combobox, the input value is not constrained to a selected item, making it the right choice for search boxes and filterable command lists rather than for a "pick exactly one of these" selection control.
Root → InputGroup (Input, Trigger, Icon, Clear, Value) + Portal → Backdrop, Positioner → Popup (Arrow, Status, Empty, List → Row → Item, Separator, Group → GroupLabel, Collection).filter prop (or the useFilter/useFilteredItems utility hooks) drives which items show; limit caps result count; virtualized for large lists; grid for a 2D grid navigation layout instead of a linear list.autoHighlight auto-highlights the best match as you type; keepHighlight / highlightItemOnHover control whether hover changes the highlighted item.name, form, disabled, readOnly, required on Root — same data-valid/data-invalid/data-dirty/data-touched/data-filled/data-focused field-state attributes as other form controls (see ch009 Forms, ch023 Field).<label> or Field wrapper — no built-in visible label part (unlike Select/Combobox which have .Label).| Part | Notable props | Notable data attributes |
|---|---|---|
Root | value/onValueChange, open/onOpenChange, items, filter, filteredItems, mode, autoHighlight, keepHighlight, highlightItemOnHover, grid, virtualized, limit, itemToStringValue, locale, modal, actionsRef | — |
Input / Trigger | disabled | data-popup-open, data-list-empty, data-valid/data-invalid, data-dirty, data-touched, data-filled, data-focused |
Clear | nativeButton, keepMounted | data-visible, data-starting-style/data-ending-style |
Positioner | side/sideOffset, align/alignOffset, anchor, collisionBoundary/collisionPadding/collisionAvoidance, sticky, positionMethod | data-anchor-hidden, data-empty, data-side, data-align |
Item | value, onClick, index, nativeButton, disabled | data-highlighted, data-disabled |
Status / Empty | — | rendered conditionally based on filter results / loading state |
grid + Row when suggestions are naturally 2D (e.g. emoji or color pickers), not a manually-built CSS grid over a linear List — grid mode changes keyboard navigation (arrow keys move in 2D) to match.virtualized + limit together are the standard combo for large suggestion sets — set a limit even when virtualized, since filtering itself still has a cost.InputGroup parts.Positioner/collisionBoundary props share the same positioning API family used by every anchored popup component.