Search Field Shell

Server-safe presentational trigger shell for compact booking search bars. Renders a forwardRef button with a label row and a summary row. Designed for Radix PopoverTrigger / DialogTrigger asChild composition — Radix injects aria-expanded, data-state, and onClick automatically.

core/search-field-shell

Installation

1 · Add registry to components.json

2 · Install component

Examples

States

Empty, filled, active, invalid, disabled states and horizontal bar composition.

API Reference

PropTypeDescription
labelreq
stringShort uppercase label — e.g. "Where", "Check-in", "Guests".
summaryreq
stringCurrent value summary — e.g. "Cape Town", "Dec 15 – 20 · 5 nights".
placeholder
stringShown in the summary row when filled is false.
icon
React.ReactNodeOptional leading icon rendered next to the label.
filled
booleanWhen true, label and summary render at full opacity with font-medium weight.
active
booleanApplies an active bg state (e.g. when the associated popover is open).
invalid
booleanApplies a destructive ring to signal a validation error.
required
booleanAppends a red asterisk to the label and sets aria-required.
disabled
booleanDisables the button.
ariaDescription
stringPersistent helper text for screen readers. Rendered as a visually hidden element and associated via aria-describedby — announced when the button receives focus.