brijr/ui

Lab

Label

npx shadcn@latest add @brijr/label

Content

text
with icon
trailing icon
required marker
optional hint

With controls

Press each label: it focuses, checks or toggles its control.

Input · above
Textarea · above
Checkbox · after
Checkbox · wrapped
Switch · after
RadioGroup · htmlFor group
40
Slider · htmlFor slider

Disabled

A label after a disabled peer control dims. A label before it is not a peer, so put the pair in a Field: there the label dims wherever it sits.

peer disabled · after
peer disabled · before
Field · disabled control · before
Field disabled · before
Field disabled · wraps its control
group data-disabled=true · before

Long text

wraps · max-w-xs
truncate