Label

An accessible label that dims itself when its control is disabled.

Playground

Tweak the props, the preview and the code follow.

Props
<Label htmlFor="email">Email address</Label>
<Input id="email" />

Installation

npx @plumsydev/plum-ui add label

Also pulls in checkbox, input automatically.

Usage

import { Label } from "@/components/ui/label"
<Label htmlFor="email">Email</Label>

Examples

With input

Form hints

Required markers, counters, and disabled styling for free.

0 / 160

Labels dim automatically next to disabled controls.

API Reference

Label

Extends Radix Label.Root. Pass htmlFor to link it to a control.

PropTypeDefault
htmlFor

The id of the associated control.

string—