Textfield

Preview

Code sample

import { Textfield } from '@dormakaba/digital-reactnative-visual';

// searchfield
<Textfield icon="icon-search" placeholder="search" noBorder />

<Textfield value="lorem ipsum" noMargin />
<Textfield label="Firstname" placeholder="Firstname" />
<Textfield label="Firstname" placeholder="Firstname" info />
<Textfield label="Firstname" placeholder="Firstname" success />
<Textfield label="Firstname" placeholder="Firstname" warning />
<Textfield label="Firstname" placeholder="Firstname" error="must be unique" />

Props

Name

Type

Description

label

string

The label to show about the select element

placeholder

string

Value to show when having no selection

value

string

key of selected element

onChange

function

returns the object selected { key, value }

*

boolean

set label style: bold, info, success, warning, error

error

string

error can be a string containing the validation error

disabled

boolean

disabled state

noMargin

boolean

removes the 10px margin top

noBorder

boolean

removes border

icon

string

name of icon to show on left side (see preview searchfield)

Last updated