Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

UIComponentsReact

Label

The name of a form control.

Rendered by React 19.3.1

label.tsx

Installation

npx shadcn@4.23.0 add https://hamur.dev/r/react/label.json

It also adds utils. The app needs its setup first: Installation.

Usage

Point it at its control with for (htmlFor in React). Inside a Field, use FieldLabel, which the Field wires up.

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

Examples

Default

A label beside a checkbox.

Its preview and code are at the top of the page.

API reference

Label wraps no headless component of its own: its parts are elements with classes, and their props are the element's.