Label

Displays an accessible label associated with controls.

Installation

npx shadcn@latest add https://scrollxui.dev/registry/label.json 

Usage

import { Label } from "@/components/ui/label"
<Label htmlFor="email" direction="right" >Your email address</Label>
<br />
<Label htmlFor="email" disableAnimation>Your email address</Label>

API Reference

Label

Displays an accessible label associated with controls.

Props

PropertyTypeDefaultDescription
direction"left" | "right" | "top" | "bottom""left"
Animation direction when label appears.
disableAnimationbooleanfalse
If true, disables the motion animation.
classNamestring
Custom CSS classes applied to the label.
childrenReactNode
Content rendered inside the label.
htmlForstring
ID of the associated form element (from LabelPrimitive).
disabledbooleanfalse
Marks the label as disabled and adjusts styling.

Built withby Ahdeetai.