Skip to content
coatx
Esc
↑↓navigate↵open⌘Jpreview
On this page

Label

Form control label with disabled and invalid state styling.

Usage

import { label } from "coatx/label";
import { input } from "coatx/input";

export const NameField = () => (
  <>
    <label for="name" {...label()}>
      Name
    </label>
    <input id="name" {...input()} />
  </>
);

Exports (coatx/label)

Export Description
label(options?) Label recipe
labelStyles Compiled StyleX style map

Options

Option Type Default
disabled boolean false
invalid boolean false

Was this page helpful?