Cnippet

Label

Forms

About

An accessible form label built with Base UI that associates with inputs and other controls, with a polymorphic render prop for custom elements.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Label to your project and fits it to your theme.

Code

How Label is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

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

export default function Particle() {
  const id = useId();
  return (
    <div className="flex flex-col items-start gap-2">
      <Label htmlFor={id}>Email</Label>
      <Input
        aria-label="Email"
        id={id}
        placeholder="you@example.com"
        type="email"
      />
    </div>
  );
}

Dependencies

More by Cnippet

View all
  • Team

    Team

    1.3K
  • Davincho Hero-1

    Davincho Hero-1

    692
  • Aero Hero-3

    Aero Hero-3

    590
  • Features

    Features

    521
  • Random Letter Swap Navigation

    Random Letter Swap Navigation

    514
  • Services with Animated Hover Modal

    Services with Animated Hover Modal

    472
  • Blogs

    Blogs

    399
  • Aero Hero-1

    Aero Hero-1

    368

More in Forms

View all
  • Contact Card

    Contact Card

    1K
  • Premium Auth

    Premium Auth

    537
  • Login 2

    Login 2

    10
  • Book A Demo 1

    Book A Demo 1

    78
  • Form

    Form

    17
  • Card Studio

    Card Studio

    45
  • Form

    Form

    12
  • Split Sign In Form

    Split Sign In Form

    84