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

Tabs

Splits related content on one page into panels that people switch between, without leaving the page.

Added · New

Live example

Tabs

Overview

Use this service to apply for a new Nigerian passport or renew one that has expired. It takes about 20 minutes, and you will need to book an appointment to have your photo and fingerprints taken.

Controls
Property Control What it does
Mobile shows the tabs that fit, then More, which opens a menu of the rest.
2 to 5 short labels, in order.
Exactly one is selected. The first is selected when the page loads.

Overview

Use tabs to split related content on one page into a few panels. People switch panels without leaving the page, and most only need one of them.

Use tabs for

  • Content in 2 to 5 clear, separate parts
  • Parts people don’t need to compare side by side
  • Parts with short, obvious labels

Don’t use tabs for

  • Content people need to read in order (use headings)
  • Steps in a process, or a form split across tabs
  • Page navigation (tabs never change the URL)

Examples

Two versions. Without JavaScript, and in print, every panel shows in order under its own heading.

Overview

Use this service to apply for a new Nigerian passport or renew one that has expired. It takes about 20 minutes, and you will need to book an appointment to have your photo and fingerprints taken.

Desktop

A tab list over one panel. Up to 5 tabs, left aligned, never wrapping.

Overview

Use this service to apply for a new Nigerian passport or renew one that has expired. It takes about 20 minutes, and you will need to book an appointment to have your photo and fingerprints taken.

Mobile

The tabs that fit, then More. More opens a menu of the rest; a tab chosen there swaps into the slot next to More.

Specifications

The properties of tabs. The same in HTML and React.

Tabs properties
Property Type Possible values Description
tabs array
  • label + content
Required. 2 to 5 tabs, in order. Each panel starts with a heading that repeats its label.
selected number
  • 0 – (tabs − 1)
Optional. Defaults to 0, the first tab.
label string
  • text
Required. The aria-label for the tab list. Says what the tabs are about.
activation string
  • "automatic"
  • "manual"
Optional. Use "manual" if panels are slow to load: arrows move focus, Enter opens. Defaults to "automatic".

In code, the row is role="tablist" with an aria-label. Each tab is <button role="tab" aria-selected aria-controls id>; only the selected tab has tabindex="0". Each panel is role="tabpanel" aria-labelledby tabindex="0", and hidden panels use the hidden attribute. Without JavaScript every panel shows in order under its heading. On small screens, More is a separate <button aria-haspopup="true" aria-expanded> after the tablist, not a tab.

Tokens

Tabs tokens and contrast
Part Token Contrast on the page
Unselected tab Label/medium · text/secondary 6.6:1
Selected tab Label/medium · text/primary · 4px action/primary/default bar (spacing/050) 17.6:1 · bar 5.8:1
Divider line border/divider at border/width/thin Decorative
Hover action/tertiary/hover tint · radius/050 top corners —
Tab size spacing/200 × spacing/150 padding, at least 48px tall —
Panel spacing/400 below the list and between stacked sections —
Focus Input Keyboard Focus effect —

Use cases

Do

Overview

Use this service to apply for a new Nigerian passport or renew one that has expired. It takes about 20 minutes, and you will need to book an appointment to have your photo and fingerprints taken.

On small screens, show the tabs that fit and put the rest behind More. Start every panel with a heading that matches its tab.

Don’t

Overview

Use this service to apply for a new Nigerian passport or renew one that has expired. It takes about 20 minutes, and you will need to book an appointment to have your photo and fingerprints taken.

Don’t wrap tabs onto two lines, nest tabs, or use tabs to move between pages. If only one tab fits before More, use headings instead.

Layout

Where tabs go and how they behave.

Left aligned, on a divider line
Up to 5 tabs. The row never wraps.
Each tab at least 48px tall
Label/medium, one or two words.
Panel below the list

spacing/400 below, starting with a heading that repeats the tab label.

More on small screens

The tabs that fit, then More at the right end, after a short divider.

Without JavaScript or in print

Every panel shows in order, under its own heading.

Copywriting

How to write tab labels.

One or two words
“Fees”, “Who can apply”.
Keep labels the same kind
All nouns, or all questions, not a mix.
Start each panel with a heading
Using the same words as the tab.
Name the tab list
The aria-label says what the tabs are about.
Icons beside, not instead
Never an icon on its own.
More always says “More”
Even when a hidden tab is open.

Examples

Tabs copywriting examples
Write Don’t write Why
Fees Click here for fees Short labels fit and scan.
Who can apply Eligibility criteria and requirements One or two words.
Overview · What you need · Fees Overview · What do I need? · Costs Keep labels the same kind.
Panel starts with “Fees” Panel with no heading Stacked panels still read in order.
More Other tabs Always the same word.

Accessibility

Tabs follow the WAI-ARIA tabs pattern: only the selected tab is in the tab order, and the arrow keys move between tabs.

Keyboard interaction for tabs
Key What it does
Tab Moves to the selected tab, then on to its panel. It doesn’t visit the other tabs.
← / → Moves to the previous or next tab and opens its panel. Wraps from last to first.
Enter / Space With manual activation, opens the focused tab. On More, opens the menu.
  • role="tablist", "tab" and "tabpanel", linked with aria-controls and aria-labelledby (WCAG 1.3.1, 4.1.2).
  • Roving tabindex: only the selected tab can be focused, and arrows move between tabs (WCAG 2.1.1, 2.4.3).
  • The selected tab has a 4px bar as well as darker text, not colour alone (WCAG 1.4.1).
  • Without JavaScript and in print, every panel shows under its heading, so nothing is hidden (WCAG 1.3.2).
  • Labels 6.6:1 and 17.6:1, bar 5.8:1. Tabs are at least 48px tall (WCAG 1.4.3, 1.4.11, 2.5.8).

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 Tabs from 01 Library – Foundations. Pick Desktop or Mobile, change the label on each Tab and set one to Selected. Don’t detach it.

References

Feedback

Report a problem with this page