fab uifab ui

Label

A text label for form inputs that provides accessible labeling.

'use client';

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

export function LabelDefault() {
  return (
    <div className='flex w-64 flex-col gap-2'>
      <Label htmlFor='email'>Email</Label>
      <Input id='email' type='email' placeholder='you@example.com' />
    </div>
  );
}

Installation

pnpm dlx shadcn@latest add @fab-ui/label

Usage

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

On this page