Components
Chip
A compact label, optionally removable. Used by TagInputComponent and FileUploadComponent.
import { ChipComponent } from '@/MigsLab/shared'
Colors
primarysecondarysuccessdanger
<ChipComponent label="primary" />
<ChipComponent label="secondary" color="secondary" />
<ChipComponent label="success" color="success" />
<ChipComponent label="danger" color="danger" />Closable
VueTypeScriptVite
<ChipComponent
v-for="chip in chips"
:key="chip"
:label="chip"
color="secondary"
closable
@remove="Chip_Remove(chip)"
/>API
Props
| Name | Type | Default | Description |
|---|---|---|---|
label | string | '' | Chip text (ignored when the default slot is used). |
color | 'primary' | 'secondary' | 'success' | 'danger' | 'primary' | Color variant. |
closable | boolean | false | Show a remove button. |
Events
| Event | Payload | Description |
|---|---|---|
remove | — | The remove button was clicked. |
Slots
| Name | Description |
|---|---|
default | Custom chip content; falls back to label. |