Form Primitives

Field label, error, and wrapper components

SaaSForms

Overview

Form Primitives provide the foundational elements for building forms: FieldLabel for accessible labels with required/optional indicators, FieldError for validation error messages, and FieldWrapper for combining a label, input, help text, and error into a cohesive field group.

Usage

import { FieldError, FieldLabel, FieldWrapper } from "@leanicon/web-builder-library/saas";

<FieldLabel required>Email Address</FieldLabel>

<FieldError message="This field is required" />

<FieldWrapper name="email" label="Email" required error="Invalid email">
  <input type="email" id="email" />
</FieldWrapper>

Variants

FieldLabel - Default

FieldLabel - Required

FieldLabel - Optional

FieldLabel - Dark

FieldError - With Message

FieldError - With Children

FieldError - Dark

FieldWrapper - Default

FieldWrapper - With Help Text

Choose a unique username for your account

FieldWrapper - With Error

FieldWrapper - Disabled

FieldWrapper - Dark

We will never share your email