# Stock Search

> A data-driven stock-search autocomplete combobox that live-filters a market dataset into a results listbox with official brand-logo tiles, price and trend chips, match highlighting, recent searches, skeleton loading, and full keyboard navigation — fully token-driven and design-system agnostic.

- Category: Filter
- Frameworks: Vanilla, React + CSS, React + Tailwind
- Design system: Runway
- Dark mode: yes
- Access: premium (Atheros AI Pass)
- Tags: search, combobox, typeahead
- Page: https://builder.atheros.ai/components/stock-search
- Preview: https://d17nmjscumqk5d.cloudfront.net/builder/templates/tpl_builder_stock_search/preview-e1b7e493bad7.webp

## Features

- WAI-ARIA combobox/listbox pattern with `aria-expanded`, `aria-controls`, `aria-autocomplete`, and `aria-activedescendant`
- Debounced live filtering over name, ticker, and sector, case-insensitive
- Matched-substring highlighting built with safe DOM nodes and a `<mark>` element
- Official brand-logo tiles — inline Simple Icons marks tinted with each company’s brand color, with a ticker-monogram fallback
- Right-aligned price and signed change chip (green up, red down) on every row
- Recent searches persisted to `localStorage`, shown when the input is focused and empty
- Skeleton shimmer rows while the async data source resolves
- Empty state with a Tabler icon when no stock matches the query
- Full keyboard support: ArrowUp/ArrowDown with wrap, Home/End, Enter, Escape
- `/` and Cmd/Ctrl+K focus shortcuts with a visible `/` hint chip
- Polite live region announcing result counts and selection
- Full dark-mode token set driven by a host-shell `body.dark` class — no built-in toggle

## Accessibility

- **Combobox** — `role="combobox"` with `aria-expanded`, `aria-controls`, `aria-autocomplete`
- **Active option** — `aria-activedescendant` references the active option id
- **Listbox** — `role="listbox"` with `role="option"` items and `aria-selected`
- **Keyboard nav** — Arrow keys with wrap, Home/End, Enter, Escape
- **Focus indicators** — `:focus-visible` with `--ring` outline on all elements
- **Reduced motion** — `prefers-reduced-motion: reduce` disables all animations
- **Live regions** — `aria-live="polite"` announcing result counts and selection

## Keyboard shortcuts

- `/` — Focus the search input
- `Cmd/Ctrl + K` — Focus and select the search input
- `ArrowDown` — Move to next option (wraps)
- `ArrowUp` — Move to previous option (wraps)
- `Home` — Move to first option
- `End` — Move to last option
- `Enter` — Select the active option
- `Escape` — Close the panel or clear the input

## Common questions

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

Stock Search 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 the Stock Search filter component free?**

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

**Does Stock Search support dark mode?**

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

## Get the code

Preview Stock Search 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/stock-search

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
