THEME
MOTION
HAPTIC
SOUND

FORMFIELD

Stacks a label, a Cathode input, and an optional hint or error message. Auto-wires aria attributes.

Live demo

Import

import { FormField } from '@cathode-ui/react';

Props

Name Type Default Required Description
label string yes
children ReactElement yes Single Cathode input.
hint string
error string Swaps the hint slot and turns the label danger-red.
required boolean false Renders a "*" next to the label.

Examples

basic

<FormField label="CALLSIGN" hint="4 characters."><TextField value={c} onChange={setC} /></FormField>

error

<FormField label="EMAIL" error="Invalid address."><TextField value={e} onChange={setE} /></FormField>

Accessibility

Role: group

Feedback

Hapticnone
Soundnone

← All components