Basic Usage
Size Variants
Big (48px height)
Small (38px height, default)
Design Variants
Primary Design (Gray Background)
Secondary Design (White with Border)
Full Example with State
Custom Styling
Props
Size variant:
big: 48px height with larger font (16px)small: 38px height with standard font (14px)
Visual design variant:
primary: Gray background (rgba(0, 29, 61, 0.04)) with soft bordersecondary: White background with border, no gray fill
Unique identifier for the search bar container.
Placeholder text displayed when empty.
Callback fired when the input value changes.
Custom styles for the container.
Features
- Search Icon: Magnifying glass icon from Lucide React
- Auto-focus: Changes to text cursor on focus
- Focus States: Border color changes on focus
- Responsive Padding: Icon and text positioning adjusts based on design variant
- Rounded Corners: 100px border radius for pill-shaped appearance
- Hover Effect: Cursor changes to pointer when hovering
Styling Details
Icon Positioning
- Primary design: 16px from left edge
- Secondary design: 0px from left edge
Input Padding
- Primary design, big: 46px left padding
- Primary design, small: 46px left padding
- Secondary design, big: 36px left padding
- Secondary design, small: 36px left padding
Icon Size
- Big: 24px × 24px
- Small: 22px × 22px
Border Behavior
- Primary, unfocused: 1px soft border
- Primary, focused: 1px full border, white background
- Secondary: No border changes (always soft border)
Font
- Family: Poppins
- Size (big): 16px
- Size (small): 14px