SearchPill

molecules

307×40 search input with leading magnifier icon. 30px border-radius (pill shape). Border darkens to teal + 4px glow on focus. Used in admin header as the global search.

ARIA Role: search

Demo

Demo for SearchPill (molecules)

307×40 search input with leading magnifier icon. 30px border-radius (pill shape). Border darkens to teal + 4px glow on focus. Used in admin header as the global search.

Props

PropTypeRequiredDefaultDescription
placeholderstringNo'admin.search.placeholder'
valuestringNo
onSearch(query: string) => voidYesDebounced 300ms

TypeScript Interface

interface SearchPillProps {
  placeholder?: string;
  value?: string;
  onSearch: (query: string) => void;
  ariaLabel?: string;
  width?: number;
}

Assertions (NASA Rule 5)

  • [type]onSearch must be a function(NASA Rule 5)
  • [aria]Input must have type='search' and associated <label> with className 'sr-only'(WCAG 1.3.1, 3.3.2)

Usage

Import

import { Searchpill } from '@epasslive/design-system'

Basic

<Searchpill />

With Variants

<Searchpill variant="primary" size="md" />