Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,15 @@ import '../components.css';

1. **Label (optional):** A descriptive header for a list of jump links.

2. **Active section:** current section of the page the user is on.
2. **Active section:** The current section of the page the user is on.

3. **Inactive section:** other sections of the page that the user is not currently on. Clicking on an inactive section will bring the user to the selected section and make the section active.
3. **Inactive section:** The other sections of the page that the user is not currently on. Clicking on an inactive section will bring the user to the selected section and make the section active.

## Usage
Jump links provide a way to navigate through section headings on a page without scrolling. The highlighted active section changes as the user scrolls to the next section.

### Placement
Vertical jump links can be placed either to the left or the right of the content on the page. It is recommended to place the jump links on the left side of the content and remain consistent with the application you are working on. Only use jump links on the right when space allows and when there is an extensive nav on the left; otherwise, consider reverting to the left of the page. In both placements, the visual system is identical, including jump links with subsections. So use either according to your application’s needs.

<div class="ws-docs-content-img">
![Example of jump links placed on the left of the page.](./img/jump-links-placement-left.svg)
</div>
<div class="ws-docs-content-img">
![Example of jump links placed on the right of the page.](./img/jump-links-placement-right.svg)
</div>

### Jump links on mobile
On smaller screen sizes, jump links collapse into an expandable component that is shown above the content. This component can be expanded to display the jump links.
On smaller screen sizes, use [expandable jump links](#expandable-jump-links). This collapses a list of jump links into one component, which can be expanded to display the list of jump links.

<div class="ws-docs-content-img">
![Example of expandable jump links on mobile.](./img/jump-links-mobile.svg)
Expand All @@ -48,7 +38,7 @@ As the user scrolls down the page, the active sections are highlighted from top
</div>

### Horizontal jump links
As the user scrolls down the page, the active sections are highlighted from left to right. A jump link can be displayed left aligned or center aligned and with an optional label.
As the user scrolls down the page, the active sections are highlighted from left to right. A jump link can be displayed left-aligned or center-aligned, and can display an optional label.

<div class="ws-docs-content-img">
![Example of horizontal jump links.](./img/jump-links-horizontal.svg)
Expand All @@ -61,5 +51,25 @@ If the page has subsections, they are shown as indented jump links under the par
![Example of jump links with subsections.](./img/jump-links-subsections.svg)
</div>

### Expandable jump links
Expandable jump links hide the list of links within a collapsed section by default. Once users expand the section, they will see the full list of links, which they can then interact with.

<div class="ws-docs-content-img">
![A collapsed section with a "jump to section" link, followed by the expanded version of the section, with sub-items nested in the section.](./img/jump-links-expandable.svg)
</div>

## Placement
Vertical jump links can be placed either to the left or the right of the content on the page. In both placements, the visual system is identical, including jump links with subsections.

We recommended placing jump links on the left side of the content and remaining consistent with the application you are working on. Only use jump links on the right when space allows and when there is an extensive nav on the left; otherwise, consider reverting to the left of the page.

<div class="ws-docs-content-img">
![Example of jump links placed on the left of the page.](./img/jump-links-placement-left.svg)
</div>

<div class="ws-docs-content-img">
![Example of jump links placed on the right of the page.](./img/jump-links-placement-right.svg)
</div>

## Accessibility
For information regarding accessibility, visit the [jump links accessibility](/components/jump-links/accessibility) tab.
For information regarding accessibility, visit the [jump links accessibility](/components/jump-links/accessibility) tab.