- Dependencies:
- ∟Direct: 1
- ∟Peer: 5
- Source code ↗
- Check on NPM ↗
Overview
Section titled “Overview”Renders a label in an accessible form, with its respective controls.
import { Label } from "@inpulse-ui/label";
export function Demo() { return ( <Label for="example"> Exemple </Label> );}This component is a slight expansion of the Label developed and maintained by Radix UI.
It is based on the native label element, it will automatically apply the correct labelling when wrapping controls or using the for attribute.
Installation
Section titled “Installation”pnpm add @inpulse-ui/labelbun add @inpulse-ui/labelyarn add @inpulse-ui/labelnpm install @inpulse-ui/labelAPI Reference
Section titled “API Reference”Contains the content for the label.
| Prop | Type | Default Value | Required |
asChild | boolean | false | No |
for | string | - | Yes |
size |
| No | |
value | string | - | No |
The for property should reflect the name of the field that the Label is related to. It will not be rendered in the DOM if for property is not provided.
<Label for="example">Example</Label>Examples
Section titled “Examples”Using children
Section titled “Using children”This is the default application, which allows greater possibilities by accepting any content, including JSX elements.
import { Label } from "@inpulse-ui/label";
export function Demo() { return ( <Label for="example"> Children Exemple </Label> );}Using value
Section titled “Using value”This application is optional and only accepts string.
import { Label } from "@inpulse-ui/label";
export function Demo() { return ( <Label for="example" value="Value Exemple" /> );}The label component supports the following sizes: xs, sm, md, lg.
import { Label } from '@inpulse-ui/label';
export function Demo() { return ( <> <Label for="example" size="xs">Label</Label> <Label for="example" size="sm">Label</Label> <Label for="example" size="md">Label</Label> <Label for="example" size="lg">Label</Label> </> );}Built with by Jo Santana in Brazil.
© 2026 Inpulse. All rights reserved.