Vue3 Tag

Vue3 Tag

·

1 min read

Vue3 Tag component is used to categorize content. It supports Vue 3 with PrimeVue 3 and Vue 2 with PrimeVue 2.

Setup

Refer to PrimeVue setup documentation for download and installation steps for your environment such as Vue CLI, Vite or browser.

Import

import Tag from 'primevue/tag';

Getting Started

Content of the tag is specified using the value property.

<Tag value="New"></Tag>

Icon

An icon can also be configured to be displayed next to the value with the icon property.

<Tag value="New" icon="pi pi-plus"></Tag>

Severities

Different color options are available as severity levels.

  • success
  • info
  • warning
  • danger
<Tag severity="danger" value="Danger"></Tag>

Templating

Content can easily be customized with the default slot instead of using the built-in display.

<Tag>
   Content
</Tag>

Theming

Tag supports various themes featuring Material, Bootstrap, Fluent as well as your own custom themes via the Designer tool.

Resources

Visit the PrimeVue Tag showcase for demos and documentation.