ThiloDesign System
DV

Label

shadcn/ui

Accessible label for form controls. Always pair with htmlFor matching the input id.

@/components/ui/label

States

StatePreviewToken / class
Defaulttext-foreground text-sm font-medium
Disabledopacity-50 cursor-not-allowed
Errortext-destructive
Requiredtext-destructive on * span

Pairings — Label with each control type

PreviewControlUsage
InputText fields, email, password, search
TextareaLong descriptions, comments
CheckboxBoolean toggles, multi-select options
SwitchFeature toggles, notification settings

In context — new ticket form

New ticket

Props

PropTypeDescription
htmlForstringID of the associated input — required for accessibility
classNamestringExtend styles — e.g. text-destructive for error state
childrenReactNodeLabel text, optionally with required * indicator

In forms with react-hook-form, use FieldLabel from the Field component instead — it handles id wiring automatically.

On this page