AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Entry

AutoComplete

Free-text input with suggestions as you type — search boxes, tag entry, known-but-open fields — rendered through the shared AutoComplete.

Examples

API

PropTypeDefaultNotes
options{ value, label? }[] | { label, options }[][]Suggestions shown as the user types — flat, or grouped ({ label, options }) for section headers
valuestringCurrent free-text value
size'small' | 'default' | 'large''default'Control height — 24 / 32 / 40, matching the DS V3 Input size set
status'error' | 'warning'Validation state — red / amber border, same as the DS V3 Input
disabledbooleanfalseNon-interactive, muted control
allowClearbooleanfalseShows a clear (×) affordance once there's a value
onSearch(text) => voidFires as the query changes — fetch/filter suggestions
onSelect(value) => voidFires when a suggestion is chosen
filterOptionboolean | (input, option) => booleantrueClient-side filter; set false when onSearch fetches server-side
placeholderstringHint shown when empty

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/autocomplete-theme';   // registers <autocomplete>

Agent feed for this component (absolute, fetchable anywhere): autocomplete.agent.json · autocomplete.md · autocomplete.llms.txt

When to use

When to use
  • AutoComplete — free text where suggestions help but the user may type their own value
  • Select — the value MUST come from a known set — don't allow free text
  • Input — free text with no suggestions to offer
Filter suggestions on the query, don't dump the whole list. AutoComplete allows values outside the options — if the value must be from the set, use Select instead.
Surfaces
editor dashboard settings

Spec

Control height 32 · radius 8 · 1px #E3E3E3 border · Sizes small 24 · default 32 · large 40 (DS V3 Input set) · Status error #F5222D · warning #FAAD14 border · Focus brand #6A1EBB border · Active option #F7F7F7 (gray-20) row · Selected option brand-tint #F9F5FF row · Placeholder #8A8A8A