Components
- Accordion
- Alert
- Alert Dialog
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Button
- Card
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Dialog
- EmptyNew
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input GroupNew
- KbdNew
- Label
- Menu
- Meter
- Number Field
- Pagination
- Popover
- Preview Card
- Progress
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- SkeletonNew
- Slider
- SpinnerNew
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Toolbar
- Tooltip
Resources
Label
Renders an accessible label associated with controls.
import { useId } from "react";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
export default function Particle() {
const id = useId();
return (
<div className="flex flex-col items-start gap-2">
<Label htmlFor={id}>Email</Label>
<Input
aria-label="Email"
id={id}
placeholder="[email protected]"
type="email"
/>
</div>
);
}
Installation
pnpm dlx shadcn@latest add @coss/label
Usage
import { Label } from "@/components/ui/label"<Label htmlFor="email">Email</Label>Examples
For accessible labelling and validation, prefer using the FieldLabel component. See some related examples.
With Checkbox
Component checkbox-demo not found in registry.
On This Page