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)}
/>

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
/>