eo-n/ui
UIComponentsLabel

Label

Provides descriptive text for a form control.

Installation

CLI

npx shadcn@latest add "https://eo-n.vercel.app/r/label"

Manual

Copy and paste the following code into your project.

import * as React from "react";
 
import { cn } from "@/lib/utils";
 
function Label({ className, ...props }: React.ComponentProps<"label">) {
  return (
    <label
      className={cn(
        "text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
        className
      )}
      {...props}
    />
  );
}
 
export { Label };
Update the import paths to match your project setup.

Usage

Import all parts and piece them together.

import { Label } from "@/components/ui/label";
<Label>Accept terms and conditions</Label>

On this page