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
This field is required
FieldError - With Children
Please enter a valid email address
FieldError - Dark
This field is required
FieldWrapper - Default
FieldWrapper - With Help Text
Choose a unique username for your account
FieldWrapper - With Error
Password must be at least 8 characters
FieldWrapper - Disabled
FieldWrapper - Dark
We will never share your email