EnterUI
DocsComponentsThemesExamplesDonation
Get Started
      • Label
      • Field
      • Fieldset
      • Form
      • ValidationSummary

Default usage

  1. EnterUI
  2. /Docs
  3. /Inputs
  4. /Form Controls
  5. /Form Structure
  6. /Label
Updated 3 October 2026

Label

A precise form label with required and optional affordances.

Label defines how EnterUI handles a precise form label with required and optional affordances, including default structure, accessible states, and token-driven styling.

#Default usage

Label states

Required and optional indicators stay compact.

Code
<VStack align="stretch" gap={12} fullWidth>
  <VStack align="stretch" gap={12} fullWidth>
    <Label htmlFor="label-package" required>Package</Label>
    <Input id="label-package" defaultValue="@froggdesign/enter-ui-react" />
  </VStack>
  <VStack align="stretch" gap={12} fullWidth>
    <Label htmlFor="label-notes" optional>Release notes</Label>
    <TextArea id="label-notes" rows={3} />
  </VStack>
</VStack>

#Import

Code
import { Input, Label, TextArea, VStack } from "@froggdesign/enter-ui-react";

#Accessibility

Use htmlFor with a matching control id. Required and optional indicators are visual hints; keep validation rules in form logic.

#API

  • required displays a required marker.
  • optional displays an optional marker.
  • Extends native label props.

#Styling

Every exported component accepts className when it renders an element. EnterUI styles use .eui-* classes and --eui-* variables mapped from FroggDesign theme tokens.

PreviousVisuallyHidden
NextField
On this page
  • Default usage
  • Import
  • Accessibility
  • API
  • Styling