Introducing PrimeReact v11-alpha 🎉Discover Now
styledMisc

Tag

Tag component is used to categorize content.

DraftInfoActiveAttentionErrorFeaturedNewArchivedPendingVerified
preview

Usage#

import { Tag } from '@primereact/ui/tag';
<Tag />

Examples#

Basic#

A small label for categorizing or marking items.

Highlighted
basic-demo

Severity#

Use severity property to define the severity of the tag.

PrimarySecondarySuccessInfoWarnDangerContrast
severity-demo

Pill#

Use rounded property to display a tag as a pill.

PrimarySecondarySuccessInfoWarnDangerContrast
pill-demo

Icon#

Place the icon left or right of the label.

PrimarySecondarySuccessInfoWarnDangerContrast
icon-demo

Template#

Children of the component are passed as the content for templating.

CountryItaly
template-demo

As button#

Use as="button" to display a tag as a button.

button-demo

API#

Sub-Components#

See Primitive API for sub-component documentation.

Hooks#

See Headless API for hook documentation.

Accessibility#

See Tag Primitive for WAI-ARIA compliance details and keyboard support.