Search Filter

Search

About this component

Search Filter

Text search input with a leading icon for keyword filtering. Debounce in the consumer if you fetch on change.

Usage

The import and the props worth knowing about, in one place.

import { FilterSearch } from "@/components/beste/component/filter-search";

<FilterSearch
  label="Search"
  placeholder="Search products"
  onChange={(value) => console.log("query:", value)}
/>

Playground

Turn the props on the right; the snippet under them is what you would write to get what you see.

Search

Usage
import { FilterSearch } from "@/components/beste/component/filter-search";

<FilterSearch
  label="Search"
  placeholder="Search products"
  className="w-64"
/>

Props

Read from the component's own type, so this cannot drift from what it accepts.

PropTypeDefaultDescription
labelstringOptional group heading rendered above the input
placeholderstring
valuestringControlled text; omit to let the component manage its own state
defaultValuestringInitial text when uncontrolled
onChange(value: string) => void
classNamestring

More Filter components

View all Filter

Gender

Segmented Filter

Single-select segmented control built on Tabs for mutually exclusive choices like gender or condition. Clicking the active segment clears the selection.

Deals

Toggle Filter

Switch rows for boolean product flags like on-sale or in-stock. Multi-select, works controlled or uncontrolled.

Size

Multiselect Filter

Dropdown with checkbox rows and a selection-count badge. Keeps many-option filters compact in toolbars where a checkbox list would not fit.

Brand

Combobox Filter

Searchable dropdown for very long option lists like brands. Type to narrow options, select one or many, and see result counts inline.

Category

24
18
9
12

Checkbox Filter

Multi-select checkbox list with optional result counts. Works controlled or uncontrolled, designed for filter sidebars and toolbars.

Category

42
24
10
8
38
12

Tree Filter

Hierarchical checkbox tree for nested categories with expand/collapse rows. Checking a parent checks its whole subtree, and partially selected parents turn indeterminate.