Murasaki

Label

Renders an accessible label associated with controls.

import { Input, Label } from "@murasakijs/ui";export function LabelDemo() {return (  <div className="grid w-full max-w-sm items-center gap-1.5">    <Label htmlFor="email">Email</Label>    <Input type="email" id="email" placeholder="Email" />  </div>);}

Usage

import { Label } from "@murasakijs/ui";
<Label htmlFor="email">Email</Label>

API Reference

Props

Label renders a Radix UI Label.Root and forwards all native <label> attributes. Pair it with a control via matching htmlFor / id, and clicking the label focuses the control.

Improve this page on GitHub

On this page