Textbox

An input or textarea.

It implements the <input> or <textarea> element.

Props

Examples

A text input with a placeholder.
import { Textbox } from 'device-agnostic-ui'

<Textbox placeholder="Placeholder" />
A text input with text.
import { Textbox } from 'device-agnostic-ui'

<Textbox defaultValue="Text" />
A required text input.
import { Textbox } from 'device-agnostic-ui'

<Textbox required />
A text input with a custom validation message.
import { Textbox } from 'device-agnostic-ui'

<Textbox validationMessage="Custom message." />
A textarea.
import { Textbox } from 'device-agnostic-ui'

<Textbox type="textarea" />
A password input.
import { Textbox } from 'device-agnostic-ui'

<Textbox type="password" />
A number input.
import { Textbox } from 'device-agnostic-ui'

<Textbox type="number" defaultValue="1" />
An email input.
import { Textbox } from 'device-agnostic-ui'

<Textbox type="email" defaultValue="me@jaydenseric.com" />
A telephone number input.
import { Textbox } from 'device-agnostic-ui'

<Textbox type="tel" defaultValue="0491 570 156" />
A date input.
import { Textbox } from 'device-agnostic-ui'

<Textbox type="date" defaultValue="2001-09-11" />
A search input.
import { Textbox } from 'device-agnostic-ui'

<Textbox type="search" defaultValue="Cats" />

Tags