Skip to content
Inputs

Select

A custom select dropdown built on the native Popover API. Supports keyboard navigation, type-ahead, and disabled options.

LlmSelect + LlmOption
WCAG AA0 deps

Demo

Live PreviewReact
jsx
<LlmSelect placeholder="Select a country" onValueChange={(v) => console.log(v)}>
  <LlmOption optionValue="us">United States</LlmOption>
  <LlmOption optionValue="ca">Canada</LlmOption>
  <LlmOption optionValue="uk" disabled={true}>United Kingdom (unavailable)</LlmOption>
</LlmSelect>

API (Angular)

PropTypeDefaultDescription
[(value)]string''Currently selected value
(valueChange)(value: string) => voidCalled when selection changes
placeholderstring''Placeholder text when no option is selected
disabledbooleanfalseDisables the select
readonlybooleanfalseMakes the select read-only
invalidbooleanfalseApplies invalid/error styling
requiredbooleanfalseMarks field as required
namestring''HTML name attribute for form submission

Composition parts

Select is composed from the parts below. Each part is its own component — drop the ones you don't need.

LlmOption

A selectable option inside LlmSelect. The visible label is the element's children.

PropTypeDefaultDescription
optionValuestringValue committed to the parent LlmSelect when selected (required).
disabledbooleanfalsePrevent the option from being focused or selected.

Import

ts
import { LlmSelect, LlmOption } from '@atelier-ui/angular';

Accessibility

ARIA rolecombobox / listbox

KeyAction
Enter / Space / Arrow DownOpen the listbox.
Arrow Up / DownMove between options.
Home / EndJump to the first / last option.
EnterConfirm the highlighted option and close.
EscapeClose without changing selection.
Type a characterJump to the next option starting with that letter.
  • The trigger carries aria-expanded and aria-controls that point at the listbox.
  • Disabled options are skipped by keyboard navigation.

Prototyping with AI

Best practices

  • Always use "LlmOption" for items within the "LlmSelect".
  • Specify the "optionValue" for each option to ensure correct selection logic.
  • Use the "placeholder" prop to provide a default empty state.

Common hallucinations

  • AI may use standard HTML "select" and "option" tags.
  • AI may try to use "items" or "options" prop instead of the composable child pattern.

Example prompt

Create an LlmSelect for choosing a "Plan" with options "Basic", "Pro", and "Enterprise".