Skip to main content

Components

Tag

Tag is a label that can be used to categorize items or communicate progress, status, or process. Tags can provide users with a quicker overview of content.

variant
Description

The visual variant of the tag

Type
"default" | "outline"
Default
default
NameTypeDefaultDescription
variant"default" | "outline"default

The visual variant of the tag

Usage

Examples

Sizes

Icons

You must determine the spacing between text and icon yourself. We recommend that the padding on the Tag towards the outer edge is equal to the margin on the icon.

Variants

You can set variant="outline" to make the tag more visible on some background colors.

HTML

Apply the class name ds-tag to the element that is to be a tag.

CSS variables and data attributes

CSS Variables
NameValue
--dsc-tag-backgroundvar(--ds-color-surface-tinted)
--dsc-tag-colorvar(--ds-color-text-default)
--dsc-tag-min-heightvar(--ds-size-8)
--dsc-tag-padding0 var(--ds-size-2)
--dsc-tag-border-widthvar(--ds-border-width-default)
--dsc-tag-border-colortransparent
--dsc-tag-border-stylesolid
Data Attributes
NameValue
data-variantoutline
Edit this page on github.com (opens in a new tab)