Find a note
Studio measurements
Braun reference
Weekend route
3 notes
A 48px search capsule with a native input and a separate clear action.
3 notes
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { IOSSearchField } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/ios-search-field.
npx @noorddev/vlak-cli add ios-search-field
The StyleX leaf lands in components/vlak/ with its dependencies, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/ios-search-field.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { IOSSearchField } from "@noorddev/vlak-react";
<IOSSearchField name="q" aria-label="Search notes" placeholder="Search" onValueChange={query => console.log(query)} />A 48px search capsule with a native input and an explicit clear target.
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | ||
defaultValue | string | "" | |
onValueChange | (value: string) => void | Fires when typing or using the clear action. | |
clearLabel | string | "Clear search" |
Also accepts Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "children">.
| Keys | Does |
|---|---|
| Tab, Shift+Tab | Moves between the native search input and the clear button when text is present. |
| Enter, Space on Clear | Clears the text and returns focus to the input. |
| Enter in the input | Uses the enclosing form’s native submit behavior. |
<div class="rs-ios-search-field"><input class="rs-ios-search-field-input" type="search" aria-label="Search notes" placeholder="Search" /></div>