Data display

Tag

@xui/tag

A compact label chip. Colours, a subtle minimal variant, round/large/fill, an optional leading icon, and a removable ✕ that emits removed.

Install

pnpm add @xui/tag

Add the barrel to a standalone component's imports:

import { XuiTagImports } from '@xui/tag';

@Component({
  imports: [XuiTagImports],
  // …
})

Examples

Colors

Loading preview…

Minimal

Loading preview…

Removable

Loading preview…

Icon and interactive

Loading preview…

API

XuiTag

componentxui-tag

A compact label chip. Optionally shows a leading icon, reads as interactive, and can carry a remove ✕ that emits removed.

Variants

AxisOptionsDefaultcolornoneprimarysuccesswarningerrornoneminimaltruefalsefalselargetruefalsefalseroundtruefalsefalsefilltruefalsefalseinteractivetruefalsefalse

Inputs

NameTypeDefaultclassClassValueExtra classes, merged into the component's own rather than replacing them.''colorXuiTagColorIntent colour of the tag.this.config.colorminimalbooleanDrop the solid fill for a tinted, low-contrast tag. What you want when tags appear in bulk.this.config.minimallargebooleanUse the roomier padding and larger text.this.config.largeroundbooleanFully rounded ends, rather than the default soft corners.this.config.roundfillbooleanStretch to the available width, and stop truncating the label.falseinteractivebooleanRead as clickable (pointer cursor + hover feedback).this.config.interactiveremovablebooleanShow a trailing remove button.falseremoveLabelstringThe remove button's accessible name. A bare "Remove" is ambiguous once several tags sit together, so name the tag it belongs to — removeLabel="Remove design" — when they do.'Remove'iconstring | nullOptional leading icon name (from the app's icon registry).null

Outputs

NameTyperemovedvoidEmits when the remove button is pressed.

Source

libs/ui/tag/xui

xUI 2.0.0 — Apache 2.0 licensed. Built with Angular and Tailwind CSS.