Components

Standalone input

Unofficial Experimental

A single-line, form field with a submit button.

(Created to support the Search box component but may have other uses.)

Props
NameTypeDefaultDescription
idstring-'id' attribute to place on the base HTML element
classBlockstring-Block name override in BEM style classes applied to all elements
classModifiersModifiers[]BEM style modifiers to apply to the base HTML element
classNamestring-Extra classes to apply to the base HTML element
suffixstring-Suffix to show after the field
buttonReactNodeSubmitSubmit button text
errorReactNode-Error message
hintstring-Hint
labelstring-Label

Stories

Standard

A standard Standalone input.

Hint

If you provide a hint, it will be displayed instead of the label.

Custom submit button text

The text of the submit button is visually hidden, but can be customised for screen-readers.

Fixed width

Fluid width

Error

Currently errors are visually hidden, so it is best to avoid them. They will however be accessible to screen-readers, and the field will still be highlighted in red.

Disabled