Label

KbdModal

An accessible form label with required and hint markers.

Installation

pnpm add krz-ui

Usage

import { Label } from "krz-ui";
<Label htmlFor="email" required>Email</Label>
<Label htmlFor="bio" hint="(optional)">Bio</Label>

API Reference

PropTypeDescription
htmlForstringId of the field this labels.
requiredbooleanAdds a red asterisk.
hintReactNodeMuted text after the label.
disabledbooleanDims the label.
className / style / ref—All go to the outer element. See Customization.
className / style / ref—All go to the outer element. See Customization.
classNames{ required?, hint? }Extra classes for inner parts.