Components
Field
Combine labels, controls, and help text to compose accessible form fields and grouped inputs.
Usage
import {
Field,
FieldContent,
FieldDescription,
FieldError,
FieldGroup,
FieldLabel,
FieldLegend,
FieldSeparator,
FieldSet,
FieldTitle,
} from "@tulip-systems/core/components/client";<FieldSet>
<FieldLegend>Profile</FieldLegend>
<FieldDescription>This appears on invoices and emails.</FieldDescription>
<FieldGroup>
<Field>
<FieldLabel htmlFor="name">Full name</FieldLabel>
<Input id="name" autoComplete="off" placeholder="Evil Rabbit" />
<FieldDescription>This appears on invoices and emails.</FieldDescription>
</Field>
<Field>
<FieldLabel htmlFor="username">Username</FieldLabel>
<Input id="username" autoComplete="off" aria-invalid />
<FieldError>Choose another username.</FieldError>
</Field>
<Field orientation="horizontal">
<Switch id="newsletter" />
<FieldLabel htmlFor="newsletter">Subscribe to the newsletter</FieldLabel>
</Field>
</FieldGroup>
</FieldSet>Anatomy
<Field>
<FieldLabel htmlFor="input-id">Label</FieldLabel>
<Input id="input-id" />
<FieldDescription>Optional helper text.</FieldDescription>
<FieldError>Validation message.</FieldError>
</Field>Examples
Input
Textarea
Select
Select your department or area of work.
Slider
Price Range
Set your budget range from $200 to $800.
Fieldset
Checkbox
Your Desktop & Documents folders are being synced with iCloud Drive. You can access them from other devices.
Radio
Switch
Choice Card
Wrap Field components inside FieldLabel to create selectable field groups. This works with
RadioGroupItem, Checkbox, and Switch components.
Field Group
Stack Field components with FieldGroup. Add FieldSeparator to divide them.