Misc
Tag
A short label for a status or a category, in every severity, with an optional remove button.
WAI-ARIA tested
Import
main.ts
import { Tag } from '@vitral/vue';Severities
primarysecondarysuccessinfowarndangerhelpcontrast
Icons and shape
NewVerifiedDue todayBlocked
Removable
Tab to a remove button and press Delete.
vuetypescriptdesign-tokensaccessibilitylayout
API
Read from packages/vue/src/components/Tag/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| value | string | number | — |
| severity | Severity | Defaults to `'primary'`. |
| icon | IconProp | — |
| rounded | boolean | Pill-shaped. |
| removable | boolean | Add a remove button, named "Remove <value>"; pressing it (or Delete/Backspace on it) emits `remove`. |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| remove | event: Event | — |
Slots
| Name | Slot props | Description |
|---|---|---|
| default | — | Replaces the value text. |
| icon | — | — |
| removeicon | — | — |