React Tag

React Tag

·

1 min read

React Tag component is used to categorize content.

Setup

Refer to PrimeReact setup documentation for download and installation steps for your environment.

Import

import { Tag } from 'primereact/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

Templating

Content can easily be added like a child element.

<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 PrimeReact Tag showcase for demos and documentation.