Input + Button
A variation of a standard Input with an additional interactivity with the associated button.
Key Points
- The Button only validates the data entered in the associated input
- The Label can be resized from MD to 8XL
- The Helper Text and Optional Text can be shown or hidden
- By default, the Button is styled as a Secondary
- There are two Validation States: Error and Success
Usage
Use the Input + Button when the entered data needs to be validated separately from the rest of the form. The data can only be validated when the Button is interacted with (e.g. ‘Clicked’).
Spacing Values
Validation States
Error State
Success State
Accessibility
For users utilising a screen reader, the validation should be announced immediately when the Button is interacted with. Use ARIA Live Regions to announce the validation message.
An example of using aria-live attribute
<span aria-live="polite">Valid plan number</span>