Skip to content

Demos

Empty

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

Placeholder

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

Label

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

Label and value

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

With help

<Field.LastName
label="Label text"
value="Smith"
help={{
title: 'Help is available',
contents:
'It is one of the most beautiful compensations of life that no man can sincerely try to help another without helping himself.',
}}
onChange={(value) => console.log('onChange', value)}
/>

Disabled

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

Error

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

Validation - Required

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