LobeChatLobeHub
UI
Components
Chat
Mobile
Awesome
Brand
Mdx
Color
Changelog
Ctrl K
General
ActionIcon
ActionIconGroup
Icon
FileTypeIcon
MaterialFileTypeIcon
Data Display
Avatar
Collapse
EmptyCard
FluentEmoji
Highlighter
Image
List
Markdown
Mermaid
Snippet
SortableList
Tag
Tooltip
Video
Data Entry
CodeEditor
ContextMenu
CopyButton
EditableText
EmojiPicker
Form
FormModal
Input
SearchBar
SelectWithImg
SliderWithInput
Swatches
ThemeSwitch
Feedback
Alert
Modal
Layout
DraggablePanel
Footer
Grid
Header
Layout
Navigation
Burger
SideNav
TabsNav
Toc
Theme
ConfigProvider
FontLoader
ThemeProvider

SearchBar

SearchBar that includes an input field with a search icon and clear button, allowing users to easily search for specific items or content.

import { SearchBar } from '@lobehub/ui';
NPM
UNPKG
BundlePhobia
PackagePhobia
Anvaka Graph
Source
Edit
Previous
Input
Next
SelectWithImg

Resources

Lobe UI-AIGC Components
Lobe Icon-AI / LLM Icon Collection
Lobe Charts-Modern Charts
Lobe TTS-TTS / STT Library

Community

Report Bug
Request Feature

Help

GitHub
Changelog

More Products

🤯 Lobe Chat-AI / LLM Chat Framework
🧸 Lobe Vidol-Virtual Idols for EveryOne
🅰️ Lobe Theme-Stable Diffusion Extension
🌐 Lobe i18n-AI i18next CLI
Copyright © 2022-2025
Made with 🤯 by LobeHub
LobeHub

Default

The rest of the props of Input are exactly the same as the original input.

APIs

NameDescriptionTypeDefault
classNames--{input?:string;shortKey?:string}--
defaultValue--string--
enableShortKeyWhether to enable the shortcut key to focus on the inputbooleanfalse
loading--boolean--
onInputChange--(value:string)=>void--
onSearchWhether add spotlight background(value:string)=>voidfalse
shortKeyThe shortcut key to focus on the input. Only works if `enableShortKey` is truestring"f"
spotlight--boolean--
styles--{input?:object;shortKey?:object}--
value--string--
Ctrl F