- Docs
- components
- Label
Label
Renders an accessible label associated with controls.
Copy and paste the following code into your project.
"use client";
import { Label as LabelPrimitive } from "react-aria-components";
import { LabelStyles } from "./styles";
export interface LabelProps
extends React.ComponentProps<typeof LabelPrimitive> {}
export function Label({ className, ...props }: LabelProps) {
return <LabelPrimitive {...props} className={LabelStyles({ className })} />;
}
Update the import paths to match your project setup.
import { Label } from "~/components/ui/label";