Components
- AccordionNew
- Alert
- Alert DialogNew
- AutocompleteNew
- AvatarNew
- Badge
- Breadcrumb
- Button
- CalendarNew
- CardNew
- Checkbox
- Checkbox GroupNew
- CollapsibleNew
- ComboboxNew
- CommandNew
- Context MenuNew
- Date PickerNew
- DialogNew
- DrawerNew
- EmptyNew
- FieldNew
- FieldsetNew
- FormNew
- FrameNew
- GroupNew
- Input
- Input GroupNew
- KbdNew
- Label
- MenuNew
- MeterNew
- Number Field
- OTP FieldNew
- Pagination
- PopoverNew
- Preview CardNew
- Progress
- Radio Group
- Scroll AreaNew
- Select
- Separator
- SheetNew
- SkeletonNew
- Slider
- Spinner
- StepperNew
- Switch
- Table
- TabsNew
- Textarea
- ToastNew
- ToggleNew
- Toggle GroupNew
- ToolbarNew
- Tooltip
Label
Renders an accessible label associated with controls.
import { Input } from "mako-ui/components/input";
import { Label } from "mako-ui/components/label";
import { useId } from "react";
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="you@example.com"
type="email"
/>
</div>
);
}
Usage
import { Label } from "mako-ui/components/label"<Label htmlFor="email">Email</Label>API Reference
This is a custom component built with a render-prop API.
Label
A label component that can be rendered as different elements.
| Prop | Type | Default | Description |
|---|---|---|---|
render | React.ReactElement | - | Render as a different element |
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