Hero Image

Components

Input

Standard input with support for prefix, suffix and password handling.

Input is also broken down into variants / smaller components where each component handles more specific needs with custom built-in validation. So if you are about to use an input for amount, date, email, mobile number, ssn or time. Check out those components before you choose to use this one.

Always wrap <Input> in <ControlGroup v2> to get correct visual look and validation. It's also always a good pattern to use <Form v2> and <Button type='submit'> to get a complete form.

When grouping fields, always use <Fieldset legend='Adress'> to group inputs so that screen readers can stay in context.

For Trinidad users: If no visual legend is desired, pass srOnly={true} to <Fieldset> to hide it visually but leave it visible to screen readers.

Properties

Form

Prop nameTypeDefault ValueDescription
childrennode
classNamestring
isVerticalbool
onSubmitfunc
onValidatefunc
setErrorshape

ControlGroup

Prop nameTypeDefault ValueDescription
childrennode
classNamestring
errorMessagestring
hasErrorbool
helpMessagestring
idForInputstring
infoMessagestring
isLessSpacebool
v2bool

Inputv2

Prop nameTypeDefault ValueDescription
autoCapitalizestring'off'
autoCompletestring'on'
classNamestring''
hasFormDataboolfalse
isSmallboolfalse
prefixnodenull
refElemunionnull
selectOnFocusbooltrue
showPasswordbooltrue
suffixnodenull
idstring
inputHelpTextstring
invertedbool
labelstring
multilinebool
onClickfunc
onFocusfunc
sizestring
typestring
value *union

Fieldset

Prop nameTypeDefault ValueDescription
childrennode
classNamestring
legendstring
srOnlybool

Accessibility

This component has been validated to meet the WCAG 2.1 AA accessibility guidelines.

Read more about WCAG 2.1 AA.