lara-light-indigo

Tag

Tag component is used to categorize content.

Tags
PrimarySuccessInfoWarningDanger
Pills
PrimarySuccessInfoWarningDanger
Icons
PrimarySuccessInfoWarningDanger
Import via Module

import { Tag } from 'primereact/tag';
 
Import via CDN

<script src="https://unpkg.com/primereact/core/core.min.js"></script>
<script src="https://unpkg.com/primereact/tag/tag.min.js"></script>
 
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>
 
Properties

Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.

NameTypeDefaultDescription
valueanynullValue to display inside the tag.
severitystringnullSeverity type of the tag.
roundedbooleanfalseWhether the corners of the tag are rounded.
iconstringnullIcon of the tag to display next to the value.
Styling

Following is the list of structural style classes, for theming classes visit theming page.

NameElement
p-tagTag element
p-tag-roundedRounded element
p-tag-iconIcon of the tag
p-tag-valueValue of the tag
Dependencies

None.

Component Scale

Input Style

Ripple Effect

Free Themes

Built-in component themes created by the PrimeReact Theme Designer.

Bootstrap
Blue
Purple
Blue
Purple
Material Design
Indigo
Deep Purple
Indigo
Deep Purple
Material Design Compact
Indigo
Deep Purple
Indigo
Deep Purple
Tailwind
Tailwind Light
Fluent UI
Blue
PrimeOne Design - 2022 NEW
Lara Indigo
Lara Blue
Lara Purple
Lara Teal
Lara Indigo
Lara Blue
Lara Purple
Lara Teal
PrimeOne Design - 2021
Saga Blue
Saga Green
Saga Orange
Saga Purple
Vela Blue
Vela Green
Vela Orange
Vela Purple
Arya Blue
Arya Green
Arya Orange
Arya Purple
Premium Themes

Premium themes are only available exclusively for PrimeReact Theme Designer subscribers and therefore not included in PrimeReact core.

Soho Light
Soho Dark
Viva Light
Viva Dark
Mira
Nano

Legacy Free Themes

Nova
Nova Alt
Nova Accent
Luna Blue
Luna Green
Luna Amber
Luna Pink
Rhea

Premium Create-React-App Templates

Beautifully crafted premium create-react-app application templates by the PrimeTek design team.

Sakai
Atlantis
Freya
Ultima
Diamond
Sapphire
Serenity
Babylon
Avalon
Apollo
Roma