Usage

import { FormField, TextInput } from '@loomhq/lens'
<FormField
  label="Name"
  labelFor="name"
  errorMessage="Some error message"
>
  <TextInput id="name" />
</FormField>

Direction

Use direction="row" for Checkbox, Radio, and Switch.

With error

Examples

Form elements

Props

name
type
default
direction
'row' | 'column'
'column'
label
ReactNode
errorMessage
string | null
labelFor
string
children
React.ReactNode