Menu
Components
This page is In Progress and subject to frequent changes
Please contact Gemma D. to verify any information is correct before using it.
Checkbox
In Progress
Hey, this is an old version. View the latest
A checkbox allows users to confirm a statement. They're widely used in gaining user consent or agreement.
UX Owner: Charlie Corkbeat
UI Owner: Steven Roberts
Note: This component doesn't yet exist in Storybook, preliminary image(s) shown.
On this page
Example
When to use
A checkbox can be used where:
- the user is required to confirm a statement before they can continue?(such as agreeing to terms and conditions)
When not to use
If you’re considering using more than one checkbox in the same space, take a look at the checkbox group component instead, as it’s likely to be more appropriate.
Variants
Checkbox without container
This variant can be used when space is at a premium. For example when the button text runs over two lines.
Note: The tappable area still includes the text alongside the checkbox
Anatomy
Text input layout
Text inputs usually span 100% of the width available. However, the width can also be set to a specific value where it helps us indicate that we’re only looking for a short answer from the user.
Input states
Empty
The empty state is used where no text has yet been entered into the input (either by the user or through any form of pre-fill).
Using placeholder text
Use placeholder text only where it supports users in providing a valid input. Generally, this should be in the form of an example input.
Complete
The complete state is used wherever the field is not empty i.e. text has been entered into the input (either by the user or through any form of pre-fill).
The user input text is bolder and darker than the placeholder text used for the empty state, but the other style properties remain unchanged.
Interaction states
For general information and guidance about these states, see interaction states.
Hover
There is no hover style for text inputs. The cursor changes to the text select, which provides sufficient indication that the input is interactive.
Focus
When focus is applied to a text input an offset border is applied and the caret (text indicator) is displayed.
Disabled
When disabled, there are no hover or focus interactions and the text input can’t be interacted with. Both empty and complete inputs can be disabled. In both cases, the style is change to give the appearance of a 50% opacity.
Validation states
Error
Where text inputs are invalid, they use the same error state, irrespective of whether the validation is triggered due to an empty field or the field containing an invalid data format.
The border element is the only part of the field to change – the text style does not change.
As soon as a text input with the error validation state is focussed, the error state is removed.
Similar components
There are a range of components that either resemble (or are based on) the text input component.
Where to find this component
Documentation version history
Last updated Tuesday, 30th March 2021 09:29 by Gemma D.
Changes In This Version
| Changed Field(s) |
|---|
| Description |
| Content |
Change History
| Change | Date | User |
|---|---|---|
| Version 23 | Tuesday, 30th March 2021 09:29 | Gemma D. |
| Version 22 | Monday, 29th March 2021 21:46 | Gemma D. |
| Version 21 | Monday, 29th March 2021 21:40 | Gemma D. |
| Version 20 | Monday, 29th March 2021 21:04 | Gemma D. |
| Version 19 | Monday, 29th March 2021 16:41 | Gemma D. |
| Version 18 | Monday, 29th March 2021 13:35 | Gemma D. |
| Version 17 | Monday, 29th March 2021 13:01 | Gemma D. |
| Version 16 | Monday, 29th March 2021 08:38 | Adrian T. |
| Version 15 | Friday, 26th March 2021 15:04 | Adrian T. |
| Version 14 | Friday, 26th March 2021 14:42 | Adrian T. |
| Version 13 | Friday, 26th March 2021 14:41 | Adrian T. |
| Version 12 | Friday, 26th March 2021 14:29 | Adrian T. |
| Version 11 | Monday, 15th March 2021 22:32 | Gemma D. |
| Version 10 | Thursday, 11th March 2021 11:09 | Gemma D. |
| Version 9 | Monday, 22nd February 2021 14:26 | Gemma D. |
| Version 8 | Monday, 22nd February 2021 14:25 | Gemma D. |
| Version 7 | Monday, 22nd February 2021 14:15 | Gemma D. |
| Version 6 | Monday, 22nd February 2021 14:14 | Gemma D. |
| Version 5 | Monday, 22nd February 2021 14:14 | Gemma D. |
| Version 4 | Monday, 22nd February 2021 14:13 | Gemma D. |
| Version 3 | Monday, 22nd February 2021 14:13 | Gemma D. |
| Version 2 | Tuesday, 2nd February 2021 17:39 | Gemma D. |
| Version 1 | Tuesday, 2nd February 2021 17:23 | Gemma D. |