Navigation
Our navigation component is a collection of pill-shaped buttons that respond gracefully to various window sizes and parent containers.
Class | Applies to | Description |
---|---|---|
.s-navigation |
N/A | Base parent container for navigation |
.s-navigation__scroll |
.s-navigation |
When the navigation items overflow the width of the component, enable horizontal scrolling. By default, navigation items will wrap |
.s-navigation--item |
Child of .s-navigation |
The individual pill-shaped link in a navigation |
.is-selected |
.s-navigation--item |
Applies to a navigation item that’s currently selected / active |
Care should be taken to only include a single navigation per page. When navigations end up being nested, it can cause user confusion, and lead to a muddled page composition.
Forcing a navigation to scroll is an established pattern on mobile devices, so it may be appropriate to use it in that context. Wrapping tends to make more sense on larger screens, where the user isn’t forced to scroll passed a ton of navigation chrome.
Full width
Wrapped