Skip to content
nexubDesign System
v12.7.0

Components · Form & Input

Label

StableAdded v0.0.1

An accessible form label that optionally shows a required asterisk and links to an input via htmlFor.

import { Label } from '@nexub/react';
View as Markdown

Playground

Props

size
TSX
<Label htmlFor="demo">Full name</Label>

Examples

Default

Required

With input

States

  • default
  • disabled
  • size="sm"
  • size="md"
  • size="lg"
  • tone="neutral"
  • tone="info"
  • tone="success"
  • tone="warning"
  • tone="danger"
  • tone="leap"
  • tone="bookub"
  • tone="payub"

Props

Props
PropTypeDefaultDescription
htmlForstring—Associates the label with a form control by its id.
requiredboolean—Renders a required indicator (asterisk) after the label text.
disabledboolean—Applies disabled styling to the label.
size'sm' | 'md' | 'lg''md'Controls label font size.
tone'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'leap' | 'bookub' | 'payub' | 'founderub'—

On iOS & Android