UNPKG

@mozaic-ds/vue

Version:

Mozaic-Vue is the Vue.js implementation of ADEO Design system

26 lines (19 loc) 1.74 kB
# MTag A Tag is a UI element used to filter data, categorize, select or deselect an option. It can appear standalone, in a group, or embedded within other components. Depending on its use, a tag can be interactive (clickable, removable, selectable) or static (serving as a visual indicator). ## Props | Name | Description | Type | Default | | --- | --- | --- | --- | | `type` | Defines the behavior and layout of the tag. | `"informative"` `"interactive"` `"contextualised"` `"removable"` `"selectable"` | `"informative"` | | `size` | Determines the size of the tag. | `"s"` `"m"` `"l"` | - | | `id` | A unique identifier for the tag, used to associate the label with the form element. **Required** when type is 'selectable' or 'removable'. | `string` | - | | `name` | The name attribute for the tag element, typically used for form submission. (only relevant for type: 'selectable'). | `string` | - | | `label*` | The text label displayed next to the tag. | `string` | - | | `modelValue` | The tag's checked state, bound via v-model. Used only for type: 'selectable'. | `boolean` | - | | `disabled` | If `true`, disables the tag, making it non-interactive. Applicable to selectable, interactive, and contextualised types. | `boolean` | - | | `contextualisedNumber` | A number displayed in the badge when the tag is contextualised. | `number` | `99` | | `removableLabel` | Accessible label text for the remove button in removable tags. | `string` | `"Remove"` | ## Events | Name | Description | Type | | --- | --- | --- | | `update:modelValue` | Emits when the tag value changes, updating the modelValue prop. | [value: boolean] | | `remove-tag` | Emits when the remove button of a tag is clicked, passing the tag's ID. | [id: string] |