Code
Browse the repository files and folders.
Issues
Track bugs and feature requests.
Pull Requests
Review code changes and collaborate.
Actions
Automate workflows and CI/CD.
Best Practices
- Each tab panel should have discrete content with a unique URL, not just different formats to view the same content.
- One of the tabs should be selected by default when the user loads the page.
- Avoid overwhelming the user with too many tabs. Instead consider a navigation structure like a nav list that's meant to handle more links.
- Each view should have enough information so the user can complete their tasks without switching back and forth between tabs.
- Views should be able to be navigated in any order. This is not a pattern for navigating stepped flows.
Anatomy

- Item: Tabs to switch between views when activated.
- Current item: The item currently selected is highlighted with an underline.
- Label text: Describes the navigation item.
- Leading icon (optional): An icon that identifies the navigation item.
- Counter (optional): Displays a count next to the label.
- Overflow menu: A disclosure menu that displays additional items when there are too many to fit in the available space.
Label Text
The title of the view associated with that tab. Keep labels clear, short, and concise.
✓ Do
Use label text that clearly communicates what the tab represents.
✗ Don't
Don't rely on supplemental content to communicate what the tab represents.
Responsive Design
Underline nav handles overflowing items automatically by collapsing them into a disclosure menu.
Accessibility
Set aria-current
to "page"
to indicate that the item represents the current page. Set aria-current
to "location"
to indicate that the item represents the current location on a page.
Keyboard Navigation
Items can be activated using a cursor or keyboard:
Key(s) | Description |
---|---|
Enter | Activates the focused item. |
Tab | Moves focus to the next item. |