adit-firdaus

Label

Forms

About

An accessible form label that pairs with a control via htmlFor, with built-in required/disabled states, Apple-style typography variants, and an uppercase "eyebrow" style for settings-style section headers.

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 Label from "@/components/ui/label";

export default function EyebrowLabelDemo() {
  return (
    <div
      style={{
        maxWidth: 400,
        display: "flex",
        flexDirection: "column",
        gap: "var(--may-space-4)",
        color: "var(--may-color-text)",
      }}
    >
      <div
        style={{
          display: "flex",
          flexDirection: "column",
          gap: "var(--may-space-2)",
        }}
      >
        <Label uppercase>Allow access when locked</Label>
        <div
          style={{
            padding: "var(--may-space-4)",
            borderRadius: "var(--may-radius-card)",
            background: "var(--may-color-surface)",
          }}
        >
          <p
            className="may-text"
            data-slot="text"
            data-variant="body"
            data-tone="default"
            style={{ margin: 0 }}
          >
            Notification Center
          </p>
        </div>
      </div>
      <div
        style={{
          display: "flex",
          flexDirection: "column",
          gap: "var(--may-space-2)",
        }}
      >
        <Label uppercase>Siri &amp; Search</Label>
        <div
          style={{
            padding: "var(--may-space-4)",
            borderRadius: "var(--may-radius-card)",
            background: "var(--may-color-surface)",
          }}
        >
          <p
            className="may-text"
            data-slot="text"
            data-variant="body"
            data-tone="default"
            style={{ margin: 0 }}
          >
            Show Suggestions
          </p>
        </div>
      </div>
    </div>
  );
}

More by adit-firdaus

View all
  • Steps

    Steps

    46
  • Popover

    Popover

    4
  • Adaptive Sheet

    Adaptive Sheet

    2
  • Notice Bar

    Notice Bar

    2
  • Adaptive Card

    Adaptive Card

  • Box

    Box

  • Pagination

    Pagination

  • Kbd

    Kbd

More in Forms

View all
  • Premium Auth

    Premium Auth

    593
  • Contact Form

    Contact Form

    28
  • Form

    Form

    4
  • Login 1

    Login 1

    70
  • Book A Demo 1

    Book A Demo 1

    94
  • Contact Card

    Contact Card

    1.1K
  • HeroUI Field Error

    HeroUI Field Error

    13
  • Form [react-aria-components]

    Form [react-aria-components]

    19