Components

Label

Renders an accessible label associated with controls.

Loading

Installation

pnpm dlx shadcn@latest add @toui/label

Pattern

Tokens

3 CSS variables in 3 categories.

text

CSS VariableValueDescription
--label-textvar(--component-text-sm)12px — default label size

helper-text

CSS VariableValueDescription
--label-helper-textvar(--component-text-xs)10px — helper/description text

gap

CSS VariableValueDescription
--label-gapvar(--component-gap-xs)Gap between label and required indicator

API Reference

This component is built using the Radix UI Label primitive and includes the following custom props:

Label

The main container component that provides context and styling for all card elements.

PropTypeDefault
variant enum "primary"

Credits

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking Accept, you agree to our use of cookies.
Learn more.