About
HeroUI v3 SearchField — search input with clear button: descriptions, required, validation, disabled, controlled, custom icons, full width, variants and form usage.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds HeroUI Search Field to your project and fits it to your theme.
Code
How HeroUI Search Field is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { Description, Label } from "@heroui/react"
import { SearchField } from "@/components/ui/heroui-search-field"
export default function Disabled() {
return (
<div className="flex flex-col gap-4">
<SearchField isDisabled name="search" value="Disabled search">
<Label>Search</Label>
<SearchField.Group>
<SearchField.SearchIcon />
<SearchField.Input className="w-[280px]" placeholder="Search..." />
<SearchField.ClearButton />
</SearchField.Group>
<Description>This search field is disabled</Description>
</SearchField>
<SearchField isDisabled name="search-empty">
<Label>Search</Label>
<SearchField.Group>
<SearchField.SearchIcon />
<SearchField.Input className="w-[280px]" placeholder="Search..." />
<SearchField.ClearButton />
</SearchField.Group>
<Description>This search field is disabled</Description>
</SearchField>
</div>
)
}
















