Skip to content

Official government website An official website of the Federal Government of Nigeria

How you know
Federal Ministry of Communications, Innovation & Digital Economy Nigerian Design Standards

Checkbox

Lets people pick one or more answers from a list, or tick a single box to confirm something, like agreeing to the terms.

Updated

Live example

Checkbox
Controls
Property Control What it does
Default, active, disabled or error
Checked
Ticks the box
The option, in a few words

Overview

Checkboxes sit in a group, under a legend that asks the question, and people can tick any number of them. One checkbox on its own confirms something, like “I agree to the terms”.

Use checkboxes for

  • Questions where people can choose more than one answer
  • A single confirmation, like agreeing to the terms
  • Filters people can combine

Don’t use checkboxes for

  • Exactly one answer (use radios)
  • A setting that changes straight away (use a toggle)
  • Options laid out in columns (stack them, one per line)

States

The box’s states. Disabled is also available, but explain why an option isn’t available instead where you can.

Unchecked

A 20px box with a 1px border/strong outline.

Checked

action/primary/default fill with a white tick.

Active

2px border/dark around the control. Not the keyboard focus ring.

Error

A red border, always with the group’s error message.

Specifications

The properties of the checkbox. The same in HTML, WordPress and React.

Checkbox properties
Property Type Possible values Description
label string any text The option, in a few words. The whole label is clickable.
checked boolean
  • false default
  • true
Whether the box is ticked.
name · value string any text Sent with the form. Options in one group share a name.
disabled boolean
  • false default
  • true
Avoid where you can: explain why an option isn’t available instead.

In code, each option is an <input type="checkbox"> with a <label for>, so the whole label is clickable. Put the group in a <fieldset> with a <legend>; the hint and error ids go on the fieldset’s aria-describedby. Stack options one per line.

Tokens

Checkbox tokens and contrast
Part Token Contrast on the page
Box 20px (size/icon/md) · radius/050 · surface/canvas —
Border border/strong, 1px 4.2:1
Checked fill and tick action/primary/default · text/white (2px stroke tick) 5.8:1
Active border/dark, 2px 14.3:1
Error status/error/surface border, with the group’s error message 4.9:1
Label Body/medium · text/primary 17.6:1
Spacing spacing/100 8px box to label · spacing/150 12px between options · spacing/300 24px in a fieldset —

Use cases

Do

How would you like us to contact you?

Select all that apply

Ask the question in the legend and stack the options, one per line.

Don’t

Don’t put an error on one option. The group gets one error message under the legend.

Layout

How checkboxes are laid out.

One per line
Stack options vertically, never in columns.
Legend first
Then the hint or error, then the options.
12px between options
24px (spacing/300) inside a fieldset, 32px (spacing/400) between questions.
Whole label clickable
The label is part of the target, so it is easy to tap.
Same on every screen
Options stay one per line on mobile and desktop.

Copywriting

How to write the question, the options and the error.

Ask in the legend

“How would you like us to contact you?”

Say “Select all that apply”

In the hint, so people know they can pick more than one.

Short options

A few words each, starting with a capital.

No negatives

“Send me updates”, not “Don’t send me updates”.

One error for the group

“Select how you want to be contacted”.

Say what people agree to

“I agree to the terms and conditions”, not “I accept”.

Examples

Checkbox copywriting examples
Write Don’t write Why
Select all that apply Choose any Clear instruction.
Send me email updates Don’t send me emails Positive wording.
Select how you want to be contacted Please select an option Says what to do.
I agree to the terms and conditions I accept Says what they agree to.
Text message SMS Plain words, no jargon.

Accessibility

Real checkbox inputs with labels, grouped in a fieldset with a legend.

Keyboard interaction for checkboxes
Key What it does
Tab Moves to each checkbox in turn. Labels and legends aren’t Tab stops.
Shift + Tab Moves back.
Space Ticks or unticks the checkbox.
  • Each checkbox has a <label for>, and the whole label is clickable (WCAG 1.3.1, 2.5.8).
  • The group is a fieldset with a legend; the hint and error are linked with aria-describedby (WCAG 1.3.1, 3.3.2).
  • Errors use an icon and text, never only a red border (WCAG 1.4.1, 3.3.1).
  • The border is 4.2:1 and the checked fill 5.9:1 (WCAG 1.4.11).
  • Active shows a 2px border/dark border, 14.3:1 (WCAG 2.4.7).

For developers

Copy the code for HTML, WordPress or React from the Code tab in Live example. The options are listed under Specifications.

For designers

Use Form/Checkbox from 01 Library – Foundations, inside Form/Checkbox group for a question. Set Checked, State and the Label. Don’t detach it.

References

Feedback

Report a problem with this page