Misc
Chip
A compact token for a filter, a recipient or a tag, with an optional image, icon and remove button.
WAI-ARIA tested
Import
main.ts
import { Chip } from '@vitral/vue';Basic
ActionComedyMysteryThriller
Icon and image
StarredScheduled
Ada Lovelace
Removable
Tab to a remove button and press Delete.
Ada LovelaceGrace HopperKatherine JohnsonMargaret Hamilton
API
Read from packages/vue/src/components/Chip/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| label | string | — |
| icon | IconProp | — |
| image | string | An image shown before the label: a face, a logo. |
| imageAlt | string | The image's alternative text. Empty marks it decorative, which it is beside a label. |
| removable | boolean | Adds a remove button, named “Remove <label>”. |
| removeIcon | IconProp | — |
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 | — | — |
| icon | — | — |
| removeicon | — | — |