Skip to content
angulux
@anguless/angulux/tag

Tag

1 declaration4 demostag.md
import
import { TagModule } from '@anguless/angulux/tag';

Basic

The label of a tag is defined with the value property.

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

Severity

Severity defines the colour of the tag.

PrimarySecondarySuccessInfoWarnDangerContrast
<agl-tag value="Primary" /><agl-tag severity="secondary" value="Secondary" /><agl-tag severity="success" value="Success" /><agl-tag severity="info" value="Info" /><agl-tag severity="warn" value="Warn" /><agl-tag severity="danger" value="Danger" /><agl-tag severity="contrast" value="Contrast" />

Rounded

Rounded tags have fully round corners.

PrimarySuccessDanger
<agl-tag value="Primary" [rounded]="true" /><agl-tag severity="success" value="Success" [rounded]="true" /><agl-tag severity="danger" value="Danger" [rounded]="true" />

Icons

An icon is displayed next to the value with the icon property.

PrimarySuccessDanger
<agl-tag icon="pi pi-user" value="Primary" /><agl-tag icon="pi pi-check" severity="success" value="Success" /><agl-tag icon="pi pi-times" severity="danger" value="Danger" />

API

Generated from the committed corpus, which check:corpus holds to the built library.

Tag

componentagl-tag

Tag component is used to categorize content.

InputTypeDefaultDescription
styleClass
deprecated — since v20.0.0, use `class` instead.
string | undefinednot documentedStyle class of the component.
severity'success' | 'secondary' | 'info' | 'warn' | 'danger' | 'contrast' | undefined | nullnot documentedSeverity type of the tag.
valuestring | undefinednot documentedValue to display inside the tag.
iconstring | undefinednot documentedIcon of the tag to display next to the value.
roundedboolean | undefinednot documentedWhether the corners of the tag are rounded.
Template slotDescription
<ng-template #icon>Custom icon template.

Inherited from BaseComponent

inherited
InputTypeDefaultDescription
dtObject | undefined undefined Defines scoped design tokens of the component.
unstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.
ptPT | undefined undefined Used to pass attributes to DOM elements inside the component. Keys become attributes, and a key that names a DOM property is also assigned to that property. Values the browser would execute go through Angular's sanitizer first, as in a template binding: markup in `innerHTML`, `outerHTML` and `srcdoc`, and URLs in `href`, `src`, `action`, `formaction` and `xlink:href`. To write one of those unsanitized on purpose, pass a `DomSanitizer.bypassSecurityTrustHtml` or `bypassSecurityTrustUrl` value. An `on*` key must be a function, and any other value for it is ignored. Keys themselves are applied as given, so let data from users choose values, never keys.
ptOptionsPassThroughOptions | undefined undefined Used to configure passthrough(pt) options of the component.