Skip to content
Dalvan UI

Chip

Use a compact label for a status, count, or category.

Playground

In review
<span class="dv-chip dv-color-primary dv-appearance-subtle">In review</span>

Usage

After setting up the CSS, apply dv-chip to a span and add an appearance class to give the label a surface.

<span class="dv-chip dv-color-success dv-appearance-subtle">Complete</span>

Examples

Sizes and status

Medium is the default. Use meaningful status text alongside the palette.

Draft In review Complete
<span class="dv-chip dv-chip--sm dv-color-neutral dv-appearance-subtle">Draft</span>
<span class="dv-chip dv-chip--md dv-color-warning dv-appearance-subtle">In review</span>
<span class="dv-chip dv-chip--lg dv-color-success dv-appearance-subtle">Complete</span>

Icon and count

Place decorative icons in leading or trailing slots. Min-square gives short labels a minimum width based on their height and grows with the label.

New 3
<span class="dv-chip dv-color-primary dv-appearance-subtle">
  <span class="dv-chip__leading"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
  <path d="M5 12h14M12 5v14" />
</svg></span>
  New
</span>
<span class="dv-chip dv-chip--min-square dv-color-primary dv-appearance-solid">3</span>

API reference

Class or attributeBehavior
dv-chipCreates the inline label container.
dv-chip--smdv-chip--mddv-chip--lgSelect one size. Medium is the default.
dv-chip__leadingdv-chip__trailingOptional direct children. Their SVGs use the current icon sizing.
dv-chip--min-squareSets minimum inline and block sizes based on line height and block padding.
dv-color-*dv-appearance-*Choose a shared palette and appearance independently.

Customization

Override chip tokens on the label or in a reusable class.

PropertyEffect and defaults
--dv-chip-gapSpace between the label and slots. Defaults to the space-50 token.
--dv-chip-radiusCorner radius. Defaults to the small radius token.
--dv-chip-padding-block / --dv-chip-padding-inlinePadding set by the selected size.
--dv-icon-sizeOverrides SVG dimensions in the slots.