Base Layer Layer I

Label

A lightweight, accessible label wrapper for form controls with built-in dark mode support.

01

Props

PropTypeDefaultDescription
childrenSnippetundefined

The content to be rendered inside the label.

classstring''

CSS classes to apply to the label.

...restHTMLLabelAttributes—

Standard HTML <label> attributes (e.g. for).

02

Samples

Standard Label

A label paired with an input field using the for attribute.

<Container class="flex flex-col gap-1.5">
  <Label for="full-name">Full Name</Label>
  <InputField id="full-name" placeholder="John Doe" />
</Container>

With Required Indicator

A label containing an inline visual indicator for mandatory fields.

<Container class="flex flex-col gap-1.5">
  <Label for="email-address">
    Email Address <Text type="span" class="text-error-500">*</Text>
  </Label>
  <InputField id="email-address" type="email" placeholder="[email protected]" />
</Container>

Custom Styled

A label customized with additional Tailwind CSS classes.

<Label for="custom-input" class="text-primary-600 font-semibold tracking-wide">
  Custom Styled Label
</Label>