Label

An accessible label for form controls, set in the macOS body text style.

@cupertinoui/labelRegistry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/label

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import { Label } from "@/components/ui/label"

<Label htmlFor="name">Name:</Label>

API Reference

Every part forwards the props of the underlying element. The props below are the ones CupertinoUI adds or changes.

Label

PropTypeDescription
htmlForstringThe id of the control the label belongs to.
classNamestringExtra classes, merged with the component's own.