Skip to Content

search-bar

ui

A search input with keyboard shortcut support, clear button, and command palette integration.

Use cases

  • Global site/app search
  • Filtering component lists
  • Command palette trigger
  • Documentation search

Features

  • Keyboard shortcut support (⌘K by default)
  • Clear button when value is present
  • Escape key to clear and blur
  • Enter key to submit
  • Controlled and uncontrolled modes

Preview

Interactive preview with light/dark mode toggle. Switch to Code tab to view the full source.

Search components...
⌘K

Installation

npx shadcn@latest add https://registry.mukoko.com/api/v1/ui/search-bar

Dependencies

lucide-reactinputbuttonkbd

API

Fetch this component's metadata and source code from the registry API.

GET/api/v1/ui/search-bar

Source

components/ui/search-bar.tsx