Ask Natuna

Ask about the design system

Hi, I am Natuna.

Ask me about the design system: components, tokens, statuses, and how to use them.

Natuna can be wrong. The docs are the source of truth.

Skip to content
  • IntroductionPage
  • Ask NatunaAsk about the design systemPage
  • FoundationColor, type, number, effectPage
  • Components overviewPage
  • ThemesLight and dark modePage
  • NamingProperty and page namesPage
  • Privacy statementPage
  • Text-safe stepsFirst AA and AAA step per color rampSection
  • AccessibilityWCAG 2.2 AAA rulesSection
  • Dark modeThemesSection
  • Using it todayFigma file and React codeSection
  • Component statusDesign status and In ReactSection

Arrow keys to move, Enter to open, Esc to close.

Search

A field for finding content by keyword.

Status
ReadyBuild day 14 of 21
Code
In React
Role
Form

Usage

This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.

Pastes as editable layers. Shadows are not exported.

import { useState } from "react";
import { SearchField, type SearchFieldType } from "@/ui";

const type: SearchFieldType = "withButton";

export default function SearchDemo() {
  const [query, setQuery] = useState<string>("");

  return (
    <SearchField
      label="Search transactions"
      placeholder="Search transactions"
      type={type}
      value={query}
      onValueChange={setQuery}
      onSearch={(q: string) => console.log(q)}
    />
  );
}

Variants and states

Every specimen is the real component from src/ui, held in one state.

type basicdefault, filled, error, disabled
type withButtondefault, filled, error, disabled
type inlinedefault, filled, error, disabled

Pastes as editable layers. Shadows are not exported.

Props

label
string · default none
Required. The accessible name; the design has no visible label.
type
"basic" | "withButton" | "inline" · default "basic"
Inline is a rounded, unbordered field.
value, onValueChange
string, (value) => void · default none
Controlled text. Leave out value for uncontrolled.
onSearch
(value) => void · default none
Called on Enter and on the Search button.
error
string · default none
Marks the field invalid and shows the message.
buttonLabel
string · default "Search"
showIcon
boolean · default true
The left search icon.
...rest
InputHTMLAttributes · default none
placeholder, disabled, name, and so on.

Figma to code

Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.

🧰 Type
type
basic, withButton, or inline.
🎯 State
value, error, disabled
Filled is any text, which also shows the clear button. Hover and focus come from the browser.
Placeholder
placeholder
Native attribute.
Show Icon Left
showIcon
Boolean.
Button Value
buttonLabel
With Button only.

Accessibility

What the code in src/ui does today, and what it leaves to you.

Keyboard

  • A native search input in a form with role=search: Enter searches, the clear button and Search button are reachable with Tab.

Screen readers

  • The field is named by label. The clear button is named Clear search. The error is linked with aria-describedby.

What you still need to do

  • Announce the number of results when they change, for example in a live region.

When to use

The top of long lists and the header of content-heavy apps.

Do and don't

Do

  • Say what can be searched in the placeholder.
  • Show a clear empty state when nothing matches.

Don't

  • Hide search behind an icon when it is the main task.
  • Search on every keystroke against a slow server without debouncing.

4 of 28 other molecules, same role and ready ones first.

See all components

Status reflects the component tracker snapshot of 29 October 2026.