ds_tag: Tag Component

View source: R/ds-misc.R

ds_tagR Documentation

Tag Component

Description

Create a text label tag using Designsystemet styles.

Usage

ds_tag(..., color = NULL, variant = NULL, size = NULL, class = NULL)

Arguments

...

Tag content (text or child elements).

color

Color context: one of "info", "success", "warning", "danger", "accent", "neutral", "brand1", "brand2". Maps to the DS data-color attribute.

variant

Structural variant: "outline" adds a subtle border.

size

Size variant ("sm", "md", "lg").

class

Additional CSS classes.

Details

Tags are the right component for standalone text status labels such as "New", "Beta" or "Active". For numeric count indicators, use ds_badge.

Value

A Shiny tag object

Examples

ds_tag("New")
ds_tag("Active",  color = "success")
ds_tag("Warning", color = "warning", variant = "outline")

shinyds documentation built on Aug. 22, 2026, 5:08 p.m.