Label

A styled wrapper around the native HTML label element with consistent typography and disabled-state handling.

Default
Disabled
Error State

That username is already taken.

Looks good!

Form Layout

Stacked

This is the name others will see.

Inline

Required

Fields marked with * are required.

With Checkbox

Email preferences

With Icon

Installation

npx shadcn@latest add @byronwade/label

Props

PropTypeDefaultDescription
classNamestringAdditional CSS classes to merge with the default label styles.
htmlForstringAssociates the label with a form control by its id.
childrenReact.ReactNodeThe label text or content.