Skip to content

Demos

Empty

<Field.FirstName onChange={(value) => console.log('onChange', value)} />

Placeholder

<Field.FirstName
placeholder="Enter a name..."
onChange={(value) => console.log('onChange', value)}
/>

Label

<Field.FirstName
label="Label text"
onChange={(value) => console.log('onChange', value)}
/>

Label and value

<Field.FirstName
label="Label text"
value="John"
onChange={(value) => console.log('onChange', value)}
/>

With help

<Field.FirstName
label="Label text"
value="John"
help={{
title: 'Help is available',
contents:
'Advantages of helping people include you being a good example for your children, family, and friends, and you having a direct impact on the trajectory of the lives of a lot of people.',
}}
onChange={(value) => console.log('onChange', value)}
/>

Disabled

<Field.FirstName
value="John"
label="Label text"
onChange={(value) => console.log('onChange', value)}
disabled
/>

Error

This is what is wrong...
<Field.FirstName
value="Unnamed"
label="Label text"
onChange={(value) => console.log('onChange', value)}
error={new FormError('This is what is wrong...')}
/>

Validation - Required

<Field.FirstName
value="John"
label="Label text"
onChange={(value) => console.log('onChange', value)}
required
/>