Angular Tag

Angular Tag

·

1 min read

Angular Tag component is used to categorize content.

Setup

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

Import

import { TagModule } from 'primeng/tag';

Getting Started

Content of the tag is specified using the value property.

<p-tag value="New"></p-tag>

Icon

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

<p-tag value="New" icon="pi pi-plus"></p-tag>

Severities

Different color options are available as severity levels.

  • success
  • info
  • warning
  • danger

Templating

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

<p-tag>
    Content
</p-tag>

Theming

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

Resources

Visit the PrimeNG Tag showcase for demos and documentation.