# Search Filter

> A spotlight search combobox in a cool iris color world — it rests as a compact pill with a ⌘K hint, blooms wider with a soft primary halo when focused, and drops an animated results panel while you type: rows cascade in with staggered fade-rises, an Everything/Files/People segmented scope.

- Category: Filter
- Frameworks: Vanilla, React + CSS, React + Tailwind
- Design system: Ember Studio
- Dark mode: yes
- Access: premium (Atheros AI Pass)
- Tags: search, combobox
- Page: https://builder.atheros.ai/components/search-filter
- Preview: https://d17nmjscumqk5d.cloudfront.net/builder/templates/tpl_builder_search_filter/preview-9c69644d1757.webp

## Features

- Compact resting pill that expands smoothly (width spring) on focus, with a layered primary halo instead of a hard focus ring
- Detached dropdown panel (absolutely positioned) that fades/rises in while typing — zero page layout shift
- Panel height morphs between measured pixel values as results change; rows re-cascade with staggered fade-rises on every query
- Live search over item titles, case-insensitive, debounced input (90ms)
- Every match occurrence wrapped in an iris highlight span, built with safe DOM text nodes
- Everything / Files / People segmented scope filter with a gliding active pill and live tick-pop counts
- Full combobox a11y — `role="combobox"` + `role="listbox"`/`option`, `aria-expanded`, `aria-activedescendant`, `aria-live` status
- Keyboard: ↑/↓ cycles options, Enter selects, Escape closes then clears, ←/→/Home/End switch scopes, ⌘K / Ctrl+K and `/` focus from anywhere
- Click-outside and focus-out dismiss the panel and contract the pill
- Photo avatars with green (active now) and amber (active earlier) presence dots; image error fallback swaps in an initials tile
- Icon tiles for folder, image, video, archive, and code results (Tabler icons)
- Footer hint row with kbd chips (navigate / select / dismiss) and a live result count
- Empty state echoes the query; skeleton row covers the initial fetch behind the async data seam (`js/api.js`)
- Honors `prefers-reduced-motion: reduce` — all motion collapses to 0.01ms

## Accessibility

- **Combobox** — Input has `role="combobox"`, `aria-expanded`, `aria-haspopup="listbox"`, `aria-autocomplete="list"`, `aria-controls="sf-listbox"`
- **Listbox** — `role="listbox"` results with `role="option"` rows, `aria-selected`, unique option ids, `aria-activedescendant` tracking
- **Scopes** — `role="tablist"` / `role="tab"` with `aria-selected`, roving tabindex, ←/→/Home/End activation
- **Search landmark** — `role="search"` on the field with a visually-hidden `<label>`
- **Live results** — Visually-hidden `aria-live="polite"` status announces result counts and selections
- **Dismissal** — Escape closes the panel (then clears), click-outside and focus-out dismiss
- **Focus indicators** — Engaged pill halo + primary border for the input; high-contrast `:focus-visible` outline elsewhere
- **Target sizes** — All operable controls ≥ 24×24px (input stretches to pill height)
- **Skeleton / glider / dots** — `aria-hidden="true"` — purely decorative
- **Reduced motion** — `prefers-reduced-motion: reduce` collapses all animation

## Keyboard shortcuts

- `⌘K / Ctrl+K` — Focus and select the search input
- `/` — Focus the search input
- `↑ / ↓` — Cycle the highlighted option (reopens a closed panel)
- `Enter` — Select the highlighted option
- `Escape` — Close the panel → clear the query → blur
- `← / → / Home / End` — Switch scopes when a scope tab has focus

## Common questions

**Which frameworks is Search Filter available in?**

Search Filter ships as Vanilla, React + CSS and React + Tailwind — HTML, CSS, JS and React source you can copy, download or clone into Atheros AI Builder.

**Is Search Filter free?**

Search Filter is a premium component. Anyone can preview it; the source, downloads and AI customisation are included with Atheros AI Pass.

**Does Search Filter support dark mode?**

Yes. Search Filter ships light and dark themes, both drawn from the Ember Studio design system's tokens. Switch the preview to dark mode to compare them.

## Get the code

Preview Search Filter live, then sign in to copy or download the source, apply another design system, or ask the AI assistant to change it: https://builder.atheros.ai/components/search-filter

Every component on https://builder.atheros.ai is also reachable from Claude Code, Cursor and Codex through the Atheros MCP server (paid plans). Component index: https://builder.atheros.ai/llms-components.txt
