Skip to content

SearchBar

ReleasedShipped in 0.2.0StorybookFigma canvas 57:1645Source
  • Use type field to search within one list or page, such as “Search messages”, “Search reviews” or the back office “Search” in the header.
  • Use size md (36px) on web and in the back office; use size lg (44px) in the mobile app for a bigger tap target.
  • Use type stay at the top of the website and search results to find a stay by place, dates and guests.
  • Say what is being searched in the placeholder: “Search messages”, not just “Search”, unless the page makes it obvious.
  • Show the clear (×) button as soon as there is text, and keep the typed value after the results load.
  • In type stay, always show a value in each part, such as the dates already chosen, never an empty slot.
  • To filter by fixed values such as status or property: use Chip filters or a Dropdown.
    Instead: Chip, Dropdown
  • To type data into a form, such as a name or an address: use a text field.
    Instead: text field
  • More than one type stay on the same page.
    The Figma page names no alternative.

Built since the review. The second “when not to use it” item names text field as the alternative. At b9ffb76 a text field exists: Textfield is exported from the package root (src/index.ts:54) and defined in src/components/Form/Textfield.tsx, inside the folder of Form rather than a folder of its own. The release review’s finding below was written before it existed.

From the release review, under “Findings outside the gates”, as written:

Dead-end pointer in dont_use_when. text field is not a built component. Owner: designer / planning.

From the Figma documentation page (usage node 214:29), as written. These items aren’t carried into SearchBar.intent.json, which has no field for them.

  • Say what is being searched in the placeholder: “Search messages”, not just “Search”, unless the page makes it obvious.
  • Show the clear (×) button as soon as there is text, and keep the typed value after the results load.
  • In type stay, always show a value in each part, such as the dates already chosen, never an empty slot.
Property Value What it is for
type field to search within one list or page, such as “Search messages”, “Search reviews” or the back office “Search” in the header.
type stay at the top of the website and search results to find a stay by place, dates and guests.
size md (36px) on web and in the back office.
size lg (44px) in the mobile app for a bigger tap target.
state empty Figma doesn’t say.
state focused Figma doesn’t say.
state filled Figma doesn’t say.

No description for the three states. empty, focused, filled are empty strings in SearchBar.intent.json, shown above as “Figma doesn’t say.” Figma’s component description (node 213:54) only names them: “state empty (Placeholder), focused (blue border) or filled (Value, with a clear × button).” It gives no usage text for them.

From the release review, under “Findings outside the gates”, as written:

Empty state descriptions. variant_intent values for empty, focused, filled are empty strings: a recorded Figma gap, not sourced from anywhere. Owner: the designer.

From Versioning (VERSIONING.md at b9ffb76):

0.3.0 adds six components on top of 0.2.1: Calendar, Card, Form, Modal, SideBar and Table. It contains twenty-three components, each exported from the package root with its props type: Avatar, Breadcrumbs, Button, ButtonGroup, Calendar, Card, Checkbox, Chip, Dropdown, File, Form, Header, Image, Link, Logo, Modal, ProgressBar, RadioCard, SearchBar, SideBar, Stepper, Table, Toggle. Textfield is exported from the package root as well, with TextfieldProps and TextfieldState, and is public like the others (see decisions.md, 2026-10-07, Textfield). It commits you to their props, prop values and defaults, their hz- class names, the tokens in tokens.css and the three entry points (., ./styles.css, ./tokens.css). Everything in 0.3.0 beyond 0.2.1 is an addition: nothing from 0.2.1 was changed, removed or renamed. A change that breaks any of these on 0.x bumps the version to 0.4.0.

Two things about this release are worth knowing:

  • Form, Modal and Table each passed release review with their literal sizes covered by a ruling in decisions.md (Card, SideBar and Calendar have their own), because no size tokens exist for them. Those literals are accepted until the designer adds matching tokens, so a later change to use tokens at the same rendered sizes would be a patch, not a breaking change.
  • Dark theme is not verified for Table, and its warning tag has low contrast. The Table docs page says so. Neither is a breaking-change risk, but a fix that changes a token’s value is a patch and is listed in the changelog.