Label

Forms

A small, accessible label for a form control.

Live preview

Labels can also show a required mark.

Installation

Import the component from the kit. The package ships source and is transpiled by Next.js.

Import
import { Input, Label } from "@nphuonha/ui-kit";

Usage

Compose the component with your own content. All controls share the same focus, disabled and invalid states.

Usage
<Label htmlFor="email" requiredMark>Email</Label>

API Reference

Props are additive to the underlying Base UI or native element.

PropTypeDefaultDescription
htmlForstring—Associates the label with a control.
requiredMarkboolean—Shows a required asterisk.
childrenReactNode—Label content.