Label
Label example: a plain form label with small medium-weight text that dims when its peer control or parent field is disabled. A native label element.
pnpm dlx shadcn add @01orbital/label"use client"
import * as React from "react"
import { cn } from "cn"
function Label({ className, ...props }: React.ComponentProps<"label">) {
return (
<label
data-slot="label"
className={cn(
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
className
)}
{...props}
/>
)
}
export { Label }
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
// The copy: change text here, not in the markup.
const COPY = {
label: "License key",
placeholder: "orb_live_…",
} as const
/** Label paired with an Input. */
export default function LabelDemo() {
return (
<div className="flex w-full max-w-sm flex-col gap-2">
<Label htmlFor="license">{COPY.label}</Label>
<Input id="license" placeholder={COPY.placeholder} />
</div>
)
}
Dependencies
npm: cn. The CLI installs them for you.
No other registry pieces.