Skip to content
Drivn

Label

Accessible form label for pairing with inputs, checkboxes, selects, and other form controls.

Preview

Installation

npx drivn add label

Usage

1import { Label } from "@/components/ui/label"
2
3export default function Page() {
4 return (
5 <Label htmlFor="email">Email</Label>
6 )
7}

With Input

With Checkbox

With Select

API Reference

PropTypeDefaultDescription
htmlForstring—ID of the form element the label is associated with
classNamestring—Additional CSS classes to apply
childrenReactNode—Label text or content
...propsLabelHTMLAttributes—All standard HTML label attributes are supported