AsterUIDocsv1.0.2

Docs / Component reference

TagInput

Build a list of short labels. Enter or a comma commits the current label.

Tag input example

Install

sh
npx @fierst/ui@1.0.2 add tag-input

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

Exports from ./ui/tag-input: TagInput.

Download the registry source for tag-input 1.0.2.

API contracts

ts
export function* TagInput(
  props: {
    label?: string;
    value?: readonly string[];
    defaultValue?: readonly string[];
    placeholder?: string;
    hint?: string;
    maxTags?: number;
    disabled?: boolean;
    onChange?: (tags: string[]) => void;
    class?: string;
  },
  ctx: Ctx,
)