Tags
Tags are small, interactive labels used to visually group, classify, or filter criteria. Tags are wrapped with Tag Group
import { VTag, VTagGroup } from '@vonage/vivid-api-vue';
import { VTag, VTagGroup } from '@vonage/vivid-api-vue';
import { registerTag, registerTagGroup } from '@vonage/vivid-api';
registerTag('your-prefix');
registerTagGroup('your-prefix');
import { registerTag, registerTagGroup } from '@vonage/vivid-api';
registerTag('your-prefix');
registerTagGroup('your-prefix');
<your-prefix-tag label="Tag one"></your-prefix-tag>
<your-prefix-tag label="Tag two"></your-prefix-tag>
Use the icon slot in the Tag component to customise icons. If set, the icon attribute is ignored.
import { VIcon, VTag, VTagGroup } from '@vonage/vivid-api-vue';
<template #icon><VIcon name="heart-solid" connotation="alert" /></template>
<vwc-tag label="With icon">
<vwc-icon slot="icon" name="heart-solid" connotation="alert"></vwc-icon>
| Name | Description |
|---|
| default | The content of the tag-group. |
| Name | Description |
|---|
| default | The content of the tag-group. |
| Property | Type | Default | Description |
|---|
| appearance | 'duotone' | 'subtle' | 'subtle-light' | | The appearance the tag should have. |
| connotation | 'alert' | 'accent' | 'cta' | 'success' | 'warning' | 'information' | 'announcement' | | The connotation the tag should have. |
| disabled | boolean | | indicates whether the tag is disabled |
| label | string | | Indicates the tag's label. |
| removable | boolean | | indicates whether the tag is removable |
| selectable | boolean | | indicates whether the tag is selectable |
| selected | boolean | | indicates whether the tag is selected |
| shape | 'rounded' | 'pill' | | The shape the tag should have. |
| Property | Type | Default | Description |
|---|
| appearance | 'duotone' | 'subtle' | 'subtle-light' | | The appearance the tag should have. |
| connotation | 'alert' | 'accent' | 'cta' | 'success' | 'warning' | 'information' | 'announcement' | | The connotation the tag should have. |
| disabled | boolean | | indicates whether the tag is disabled |
| label | string | | Indicates the tag's label. |
| removable | boolean | | indicates whether the tag is removable |
| selectable | boolean | | indicates whether the tag is selectable |
| selected | boolean | | indicates whether the tag is selected |
| shape | 'rounded' | 'pill' | | The shape the tag should have. |
| Name | Description |
|---|
| icon | The preferred way to add an icon to the component. |
| Name | Description |
|---|
| icon | The preferred way to add an icon to the component. |
| Name | Type | Description |
|---|
| removed | CustomEvent<undefined> | Fires when the tag is removed |
| selected-change | CustomEvent<undefined> | Fires when the selected state changes |
| Name | Type | Description |
|---|
| removed | CustomEvent<undefined> | Fires when the tag is removed |
| selected-change | CustomEvent<undefined> | Fires when the selected state changes |
| Name | Params | Returns | Description |
|---|
| remove | | void | |