AsterUIDocsv1.0.2

Docs / Component reference

Select (Searchable Combobox)

Open the list, narrow the available options and choose one value.

Select example

Install

sh
npx @fierst/ui@1.0.2 add select

Registry dependencies: theme, icon. Package dependencies: @lucide/icons.

Exports from ./ui/select: SelectOption, Select.

Download the registry source for select 1.0.2.

API contracts

ts
export interface SelectOption {
  value: string;
  label: string;
  description?: string;
  disabled?: boolean;
}

export function* Select(
  props: {
    options: readonly SelectOption[];
    value?: string;
    defaultValue?: string;
    onChange?: (value: string) => void;
    label?: string;
    placeholder?: string;
    searchable?: boolean;
    searchPlaceholder?: string;
    hint?: string;
    error?: string | null;
    disabled?: boolean;
    class?: string;
  },
  ctx: Ctx,
)