Skip to main content

Components

Label

Label functions as a clear and accessible text label that tells the user what an associated form element is about.

weight
Description

Adjusts font weight. Use this when you have a label hierarchy, such as checkboxes/radios in a fieldset

Type
"regular" | "medium" | "semibold"
Default
medium
asChild
Description

Change the default rendered element for the one passed as a child, merging their props and behavior.

Type
boolean
Default
false
NameTypeDefaultDescription
weight"regular" | "medium" | "semibold"medium

Adjusts font weight. Use this when you have a label hierarchy, such as checkboxes/radios in a fieldset

asChildbooleanfalse

Change the default rendered element for the one passed as a child, merging their props and behavior.

Usage

Examples

Weights

Story not found: WeightsEn

HTML

Use the class name ds-label to style an HTML <label> element.

Use data-weight to set the font weight.

CSS variables and data attributes

No relevant css variables found.

Data Attributes
NameValue
data-weightsemibold, regular
Edit this page on github.com (opens in a new tab)