Chip

A compact tag for applied filters, selected values, keywords and statuses ( vig-tag is the same component under a second selector). Make it closable when the user can remove what it stands for; use a badge for counts and status dots.

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

Variants

variant picks a soft tone: secondary (default), primary , accent , ghost and the four status colors.

SecondaryPrimaryAccentGhostInfoSuccessWarningError

Sizes

size is md (default, about 24px tall) or sm , a denser tag for tables and toolbars.

SmallMediumSmallMedium

Closable

closable adds a remove button that emits closed (formerly dismissible and dismissed ). The chip does not hide itself: remove the item from your state, as in this filter bar.

Status: OpenAssignee: MeLabel: BugUpdated: Last 7 days

Labels and truncation

closeAriaLabel replaces the remove button's accessible name, e.g. for translations. Long labels truncate to the available width and show the full text as a tooltip.

BerlinMünchen
Customer success and support operations

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

  • The chip itself is plain text; only the remove button is focusable. It is a native <button>, activated with Enter or Space, with a 24px pointer target around its smaller icon (WCAG 2.5.8).
  • The remove button is named “Remove” plus the label by default (chipRemoveAriaLabel); override it per chip with closeAriaLabel.
  • After a chip is removed its button disappears: move focus somewhere sensible, such as the next chip or the filter input, when users remove chips with the keyboard.
  • Focus shows a ring in the chip's own color; all tones meet WCAG AA contrast for their text.

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?