General Demos
Base field components
Base field components are targeting the data type they produce. They can receive values and change handlers directly by props.
Code Editor
<Card stack> <Field.String label="Text field" value="Lorem Ipsum" onChange={(value) => console.log('onChange', value)} /> <Field.Number label="Number Field" value={789} onChange={(value) => console.log('onChange', value)} /> <Field.Boolean label="Boolean Field" value={true} onChange={(value) => console.log('onChange', value)} /> </Card>
Feature fields
Feature fields build on top of base field components and provide standard props for simplified form implementations.
Code Editor
<Card stack> <Field.String label="Fornavn" value="John" /> <Field.String label="Etternavn" value="Smith" /> <Field.NationalIdentityNumber value="20058512345" /> <Field.Email value="john@smith.email" /> <Field.PhoneNumber value="+47 98765432" /> </Card>
Layout components
Wrapping inputs in layout components provide the standard design without the need for local styles.