UnderlineNav
readyNot reviewed for a11y
This page may be removed. Primer plans to move all Rails component documentation to Lookbook.
Description
Use UnderlineNav
to style navigation links with a minimal
underlined selected state, typically placed at the top
of the page.
For panel navigation, use Primer::Alpha::UnderlinePanels
instead.
Accessibility
- By default,
UnderlineNav
renders links within a<nav>
element.<nav>
has an implicit landmark role ofnavigation
which should be reserved for main links. For all other set of links, set tag to:div
. - See
Primer::Alpha::Navigation::Tab
for additional accessibility considerations.
Arguments
Name | Required | Description |
---|---|---|
tag | Symbol One of | |
label | String Sets an | |
align | Symbol One of | |
body_arguments | Hash System arguments for the body wrapper. | |
system_arguments | Hash |
Slots
tabs
Use the tabs to list page links.
Name | Required | Description |
---|---|---|
selected | Boolean Whether the tab is selected. | |
system_arguments | Hash |
actions
Use actions for a call to action.
Name | Required | Description |
---|---|---|
tag | Symbol One of | |
system_arguments | Hash |