Atelier UI

Search components…

Search components…

Search Input

Search field with a / focus shortcut, Esc to clear, loading state and a clear button.

Edit in sandbox

Copy a prompt for your AI coding tool with the source, dependencies and usage

Props

SearchInputProps

Also accepts all props of Omit<React.ComponentProps<"input">, "value" | "defaultValue" | "onChange" | "type">

PropTypeDefaultDescription
valuestring——
defaultValuestring""—
onValueChange(value: string) => void——
onSearch(value: string) => void—Fired on Enter
loadingbooleanfalse—
shortcutstring"/"Global key that focuses the field, set to "" to disable

Install

$ npx shadcn@latest add https://chromotion.dev/r/search-input.json

More like this