Tag

A short status or category label, such as Paid, Overdue or Beta, with an optional icon, a pill shape and a remove button.

  • vig-tag
  • [vigChipIcon]
Import
import { Chip, ChipIcon } from '@vigdx/ui/chip';

NoteAn alias of vig-chip

vig-tag is a second selector of the Chip component, so import Chip to use it. Both take the same inputs, tokens and remove button; see Chip. Use a badge for counts and pill-shaped status dots.

Variants and icons

variant takes the shared variants ( success , warning , error , info , primary , secondary …) plus accent . Mark a leading icon with vigChipIcon : any icon works, sized at 1em and hidden from assistive tech.

PaidPendingOverdueNewFeaturedBetaArchived

Rounded and sizes

rounded gives a pill shape instead of the --radius-chip corners; size is md (default) or the denser sm .

Square cornersRoundedSmallSmall rounded

Removable

closable adds a remove button that emits closed ; remove the item from your state. closeAriaLabel names the button, e.g. for translations (the default is the locale's “Remove” plus the label).

UrgentBillingCustomer

Styling hooks

Internal elements carry a stable data-part and the component's data-scope; both are public API, so removing one is a breaking change. Select a part by both, e.g. [data-scope="chip"][data-part="root"] { … }: the pair stays within this component when kit components nest, and also reaches parts in overlay panels, which render outside the host. State is exposed through aria-* and, where listed, a data-state; literal values are checked by the API gate, values computed from the component's state follow its documented types. Other data-* attributes listed below (such as data-opening while an overlay animates) are API too. See Customizing.

Scope: [data-scope="chip"]

Chip styling hooks
Part Element data-state
root The visible chip box. —
icon Wrapper of the [vigChipIcon] slot. —
label The label text. —
close The close (remove) button ( closable ). —

Accessibility

  • A tag is plain text: keep the label meaningful without its color. The icon is decorative (aria-hidden).
  • The remove button is a native <button> with a 24px pointer target and a focus ring in the tag's own color; all variants meet WCAG AA text contrast.

API

Chip

vig-chip, vig-tag component

A compact tag for filters, selections and statuses.

vig-tag is an alias selector of the same component, for status tags (PrimeNG p-tag territory): <vig-tag label="Paid" variant="success" />. Both take the same inputs, so there is one implementation, one set of tokens and one remove button to keep accessible.

Chip props
Name Type Default Description
closableboolean | undefinedundefined

Adds a close (remove) button that emits closed.

closeAriaLabelstring | undefinedundefined

Accessible name of the close button; defaults to chipRemoveAriaLabel + label.

dismissiblebooleanfalse

Deprecated: Use `closable`; still honored when `closable` is unset.

—
dismissLabelstring | undefinedundefined

Deprecated: Use `closeAriaLabel`; still honored when `closeAriaLabel` is unset.

—
label required string—
—
roundedbooleanfalse

Pill shape (--radius-chip-pill) instead of the --radius-chip corners.

sizeChipSize'md'

sm is the compact tag (11px semibold, ≈20px tall); md is the default (12px medium, ≈24px tall).

variantChipVariant'secondary'
—

Templates and directives

Templates and directives
Selector Export Description
[vigChipIcon]ChipIcon

Marks projected content as the chip's leading icon, e.g. <vig-icon vigChipIcon name="check" /> or an icon font <i>. It sizes with the chip's text (1em) and is hidden from assistive tech: the label carries the meaning.

Are you sure?