Label
Form label with optional required indicator.
Examples
Basic
A simple form label.
Required
Label with a required asterisk indicator.
With Description
Label accompanied by a helper description.
Installation
pnpm add @rokle/components @rokle/tokensInstalls with the default Rokle brand. Generate a custom brand on rokle.app to use your own colours and personality.
Usage
import { Label } from "@rokle/components";import { Label } from "@rokle/components";
export function Example() {
return <Label />;
}Source
The implementation source for this component. Copy it into your project and customise.
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| htmlFor | string | - | ID of the associated input. |
| required | boolean | false | Show required indicator. |