Faber UI
Components

Label

A styled label element for form fields.

Label is a thin wrapper around the native <label> element. It dims automatically when its peer input is disabled.

Installation

Terminal
pnpm dlx shadcn@latest add https://faber-ui.vercel.app/r/label.json

Usage

typescript
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";

export default function Example() {
  return (
    <div className="flex flex-col gap-1">
      <Label htmlFor="email">Email</Label>
      <Input id="email" type="email" />
    </div>
  );
}

Examples

With an input

API

The Label accepts all props of a native <label> element.

Changelog

  1. v0.3.0Checkbox, RadioGroup and Label show their disabled styles, which previously never applied because the controls render a span.patch
Full Label history

Last updated on

On this page