Chip
Compact token: a tag, an active filter, a chosen value
A small square plate that names one thing: a tag on a post, a filter that is currently applied, a person (with image), a value picked in a multi-select. removable adds a × button: a real button, so it is in the tab order and reads as "Remove megumi". Pass label (not just the slot) when it is removable so that name exists. The × is a 24px target. Removing a chip removes the focused button with it, so on @remove move focus to a neighbor: the demo hands it to the next chip, or the previous one at the end.
A chip does not toggle. For filters that switch on and off use Toggle / ToggleGroup: they carry aria-pressed. A chip with color="accent" only looks selected. Keep it for a value already chosen, like the picks of a multi-select, never for a chip at rest. To type chips into a field, InputTags makes them for you.
Usage
import { BlessChip } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
label | string | — | |
icon | string | — | |
image | string | — | |
removable | boolean | — | |
color | "text" | "accent" | "surface" | "surface" | |
size | "md" | "sm" | "md" | |
labels | Partial<{ remove: string; }> | — |
Events
| Name | Payload | Description |
|---|---|---|
remove | [] |
Slots
| Name | Scope | Description |
|---|---|---|
default | — |