Skip to content
Frauthy Brand
Frauthy index

Go anywhere.

    No exact contract found. Try a component family, product name, prop, or keyboard key.

    ↑↓ move↵ openesc close

    Form

    input

    Form primitives: Field wires label, hint, and error a11y to any control. Pair with Input,Select, Checkbox,RadioGroup, and Switch.

    Preview

    As it appears on your ID
    Support tier

    Usage

    import { Field, Input, Select, Checkbox } from 'PRIVATE_BETA_PACKAGE_COORDINATE_REDACTED';
    
    <Field label="Email" hint="We'll never share it" error={errors().email}>
      {(props) => <Input {...props} type="email" />}
    </Field>
    
    <Select
      placeholder="Pick one"
      options={[{ value: 'a', label: 'Option A' }]}
    />
    
    <Checkbox label="Agree to terms" />

    Props

    ComponentPropTypeDefaultDescription
    Fieldlabelstring--Visible label text
    Fieldhintstring--Hint text below the label
    Fielderrorstring--Error message; sets aria-invalid
    FieldrequiredbooleanfalseAdds required indicator to label
    Inputtype'text' | 'email' | 'password' | ...'text'HTML input type
    Inputvaluestring--Controlled value
    InputonChange(value: string) => void--Change handler
    SelectoptionsSelectOption[]--Available options (value, label, disabled)
    Selectplaceholderstring--Disabled placeholder option text
    CheckboxcheckedbooleanfalseControlled checked state
    Checkboxlabelstring--Inline label beside the checkbox
    RadioGrouplegendstring--Group label rendered as <legend>
    RadioGroupoptionsRadioGroupOption[]--Radio options (value, label, disabled)
    SwitchcheckedbooleanfalseControlled on/off state
    Switchlabelstring--Visible label beside the switch

    Accessibility

    Do / Don't

    Do

    Wrap every input in a Field so labels, hints, and errors are wired automatically. Mark required fields with required.

    Don't

    Don't use placeholder text as a substitute for labels. Don't disable the submit button as the only form validation signal.