LabelBundle size 1.2 KB |
|
Renders a label in an accessible form, with its respective controls.
Installation
pnpm add @inpulse-ds/label
Usage
import { Label } from "@inpulse-ds/label";
return (
<Label for="example">Text</Label>
);
API
The for
property must reflect the name of the field to which the Label is related.
Prop | Type | Default value | Required |
for | string | - | Yes |
value | string | - | No |
Examples
Using children
This is the default application, which allows greater possibilities by accepting any content, including JSX elements.
Using value
This application is optional and only accepts string
.