Skip to content

Search Input

A search field with a keyboard shortcut cap that becomes a clear button once there is text.

Download
Customize

Escape clears, a second Escape leaves. While loading, the icon turns into a ring with one accent arc. The demo filters the months with a short simulated delay; rows that leave collapse.

Install

npx shadcn@latest add https://obsydeui.com/r/search-input.json

Usage

Import it from where the CLI puts it, or copy the files below by hand.

import { SearchInput } from '@/components/obsyde/ember/search-input/SearchInput';

export function Example() {
  return (
    <SearchInput placeholder="Search" shortcut="/" />
  );
}

Files

Plain React, TypeScript and CSS. No dependencies. The download keeps these paths.

  • ember/search-input/SearchInput.tsxcomponent
  • ember/search-input/search-input-demo.cssstyles
  • ember/search-input/search-input.cssstyles
  • ember/search-input/SearchInputDemo.tsxdemo
  • ember/shared/rolling-number.cssshared
  • ember/shared/RollingNumber.tsxshared
  • ember/shared/spring.tsshared
  • ember/shared/accent.tsshared
  • ember/forms-kit/kit.tsxshared
  • ember/shared/ember.cssshared

API

PropTypeDefault
accentAccent'ember' | 'volt' | 'arc''ember'
valueQuerystring—
placeholderPlaceholderstring'Search'
shortcutShortcutstring'/'
loadingLoadingbooleanfalse