Skip to content
Forms

LiquidSearch

A round search button that stretches into a search box with a wobbly, liquid spring. Esc or clicking away while empty folds it back.

Download
  • React
  • Tailwind CSS v4
  • motion

Props

NameTypeDefaultWhat it does
onSearch(query: string) => void—Called with the trimmed text on Enter or the search button.
placeholderstring"Search…"Hint text in the open box.
labelstring"Search"Name read out by screen readers.
widthnumber320Open width in px. Never wider than its container.
defaultOpenbooleanfalseStart open.
accentstring"#a78bfa"Glow colour when open.
classNamestringdark pillBox look.