Componentform0.35 KB gzipZero dependencies

Label

Form label with mono uppercase styling and an animated stamp-red asterisk when required.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add label

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { Label } from "@/components/ui/label"; <Label htmlFor="email" required>Email</Label>

Source code

label.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxlabel.tsx31 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export type LabelProps = React.LabelHTMLAttributes<HTMLLabelElement> & {  className?: string;  required?: boolean;}; const Label = React.forwardRef<HTMLLabelElement, LabelProps>(  ({ className, htmlFor, children, required = false, ...props }, ref) => {    return (      <label        ref={ref}        htmlFor={htmlFor}        className={cn(          "block cursor-default select-none overflow-hidden rounded-md px-2 py-1 m-1 text-sm font-medium text-muted-foreground",

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { Label } from "@/components/ui/label"; <Label />
PropTypeDescription
classNamestringOptional Tailwind or custom CSS classes merged with component styles.
requiredbooleanShows the required asterisk.