01
Overview
Reference usage
Dedicated text input with a clear button and search icon for filtering or querying.
Usage
Filled appearance
appearance is forwarded to the inner Input: "filled" draws the inset fill inside the 1px --cinder-control-border edge, and a field with no appearance is filled under data-density="comfortable" and outlined otherwise.
02
When to use
Use when
- Capturing a free-text query that filters or queries a larger dataset.
- Surfacing a global search affordance with a visible keyboard shortcut.
Avoid when
- Selecting from a constrained list of known options — use combobox instead.
03
Examples
Clearable search field
Search input with an initial value so the clear button is visible.
04
Props
Name | Type | Default | Description |
|---|---|---|---|
id | text | Stable id for the input element. Required when composing with FormField. | |
value bindable | text | '' | Bindable search value. |
placeholder | text | Placeholder text. | |
appearance | 'outlined' | 'filled' | undefined | How the field is drawn, forwarded to the inner Input. "outlined" is the control fill inside a
1px edge. "filled" is an inset fill inside the same 1px --cinder-control-border edge,
which keeps the 3:1 boundary the fill alone would lose. Left unset, the field follows its
density: filled under data-density="comfortable", outlined otherwise. | |
size | 'sm' | 'md' | 'lg' | 'md' | Height step from the shared --cinder-control-height-* scale, forwarded to the inner
Input: sm 28px, md 32px, lg 40px. |
compactTouch | boolean | false | Keep the medium face compact while extending its coarse-pointer hit area. |
shortcut | text | Optional keyboard shortcut hint (e.g. '⌘K'). Rendered as a trailing
<kbd aria-hidden="true"> badge. The shortcut itself is not wired by
this component. | |
disabled | boolean | Disables the input and the clear button. | |
readonly | boolean | Marks the input as read-only; the clear button becomes inert. | |
onValueChange | (value: string) => void | Fires on every keystroke with the current value. | |
onSearch | (value: string) => void | Fires when the native search event triggers (Enter or programmatic dispatch). | |
onClear | () => void | Fires when the clear button is clicked. | |
onkeydown | KeyboardEventHandler<T>undefinednull |