Components
BaseChip
A compact label for tags, categories and filters. It wraps v-chip with the template's shape and can pick its colour from a value.
components/ui/BaseChip.vue
View in the demo
Variants, icons and dots
Featured
Featured
Featured
Featured
Trending
Online
Busy
Settings
x-small
small
default
large
Colour from a value
Pass value and a colors map (or a function) and the chip picks its colour. Values that are not in the map use default-color. Keys are matched without case, spaces or dashes, so In progress, in_progress and inProgress are the same.
vip
regular
new
other
Removable chips
Vue
Nuxt
Vuetify
TypeScript
API
It also accepts every prop, slot and event of v-chip, which it passes through.
Props
Name | Type | Default | Description |
|---|---|---|---|
text | string | — | The label. The default slot replaces it. |
value | unknown | — | The value used to look up the colour in colors. Defaults to text. |
color | string | — | A fixed theme colour. It wins over colors. |
colors | ChipColors | — | A map { value: colour } or a function (value) => colour. |
default-color | string | — | The colour when colors has no match. |
icon | string | — | A Lucide icon before the label. |
append-icon | string | — | A Lucide icon after the label. |
dot | boolean | — | Shows a small dot before the label. |
dot-color | string | — | The colour of the dot. |
variant | "flat" | "text" | "elevated" | "outlined" | "plain" | "tonal" | — | The Vuetify variant. Defaults to tonal. |
Slots
Name | Slot props | Description |
|---|---|---|
#default | — | Replaces text. |
Chips are always label (rounded rectangles), never pills.