Tag Editor

An interactive input that manages a list of string tags. Type and press Enter to add a tag; remove them with the × button or Backspace. Supports static and async autocomplete suggestions.


Basic Usage

Bind value to a string[]. Press Enter to confirm, Backspace on empty input removes the last tag.

Value: ["svelte","typescript"]


Sizes

Three sizes: normal (default), compact, small.


Disabled, Clearable & Case

disabled disables text entry and suggestion opening; existing chip actions are not fully disabled in 0.0.34. clearable adds a clear-all button. uppercase and lowercase normalize input on the fly.

Value: []

Value: []


Options

Pass a static array or an async function as options. A dropdown appears while typing; the highlighted option is added with Enter. Set allowNew={false} to restrict input to listed values only.


Sortable

Add sortable to enable drag-and-drop reordering. The value binding stays in sync with the displayed order.

Order: ["Svelte","TypeScript","TailwindCSS","Vite","SvelteKit"]


Custom Chip & Option

Use the chip snippet for custom tag rendering and option for custom suggestions. The option snippet receives the string and a highlight flag; style both the foreground and background for the highlighted state.

Value: []