Label

The Label component is a shared form label that can be reused with Input, Select, or any other field wrapper.

Usage

import React from 'react';
import { Label } from '@nathan3boss/ui/label';
import { ExampleFrame } from '@docs-support/example-frame';

export default () => {
  return (
    <ExampleFrame>
      <Label htmlFor="spell-name">Spell name</Label>
    </ExampleFrame>
  );
};

API

Label

Renders a reusable label for form fields and grouped controls.

PropertyDescriptionTypeDefault Value
htmlForReferences the id of the related form control.string (Required)-
sizeAligns the label spacing and typography with the related field.InputSize | undefinedmd
colorApplies the semantic color treatment of the related field.InputColor | undefineddefault