Expandable Search
A collapsed icon trigger that expands into a search input on click.
Show codeHide code
Installation
import { ExpandableSearch } from "@makeplane/propel/components/expandable-search";Usage
import { ExpandableSearch } from "@makeplane/propel/components/expandable-search";
export default function BasicDemo() {
return <ExpandableSearch aria-label="Search" clearLabel="Clear search" size="lg" />;
}Examples
With suggestions
Pass items and AutocompleteContent (same anatomy as Autocomplete)
to turn the expanded input into a filterable search box. Without them, the popup stays forced
closed and it’s a plain search box.
Show codeHide code
Sizes
size steps the collapsed trigger and expanded input row together (md, lg, xl, 2xl). The
inner icon buttons sit one ladder rung below the row.
Show codeHide code
API Reference
ExpandableSearch
A collapsed icon trigger that expands into a search input on click, collapsing again on blur or
Escape while empty — unless it's required and still invalid, in which case it stays expanded so
the field remains focusable instead of collapsing back into an inert trigger. Escape restores
focus to the trigger. Expand is controllable via expanded/defaultExpanded/onExpandedChange
(separate from Autocomplete's popup open). Built on Autocomplete — pass items and
children (e.g. AutocompleteContent) for suggestions, or omit both for a plain search box.
Without children the popup is forced closed (no listbox ever mounts), so a plain search box
never claims aria-expanded. Non-empty value/defaultValue starts expanded (and controlled
non-empty value keeps it expanded); a controlled open is forced closed while collapsed so a
popup never mounts over an inert input. The Autocomplete root and its input stay mounted at
every state — the trigger/row swap width via an animated CSS grid track and inert instead of
unmounting or hidden — so a required/defaultValue input keeps working under native form
validation and keeps its own state across collapse/expand instead of resetting.