Accordion
  • Accordion
  • (Accordion item)
Alerts / Banner
  • Alert
  • Banner
Buttons
  • Button
  • Button Group
  • Close button
Card
  • Card
  • Card Layout
Collection
  • Collection
  • Collection Item
Combo box
  • Combo box
Forms
  • Date Picker
  • Range Slider
  • Time Picker
Language
  • Language Selector
Layout
  • Footer
  • (Graphic list item)
  • Grid Row
  • Header
  • Hero
  • Logo
  • Media block
  • Section
List
  • Icon List
  • Icon List Item
  • Process List
  • Process List Item
  • Step Indicator
Navigation
  • Breadcrumb
  • In page navigation
  • Navigation
  • Pagination
  • Side Navigation
Other
  • Icon
  • Table
  • Tag
  • Tooltip
Search
  • Search
Social
  • Social link
  • Social Links Group
Summary box
  • Summary box

In page navigation (in_page_nav)

The in-page navigation allows navigation to specific sections on a lengthy content page.

🔗 External documentation.

ID Label Description Schema
content Content Page content.
content_selector data-main-content-selector The element the component pulls headers from. Last part will be added to the main tag.
                        type: string

                      
title_heading_level data-title-heading-level The heading level of the navigation title header.
                        type: integer
enum:
    - 2
    - 3
    - 4
    - 5
    - 6

                      
title_text data-title-text The text of the navigation title header.
                        type: string

                      
scroll_offset data-scroll-offset Number of pixels scroll should offset from the top of the parent element.
                        type: number

                      
root_margin data-root-margin Observable margin around the observed root used for calculating the current active section. Use values similar to CSS margin.
                        type: string

                      
threshold data-threshold Percentage of the scrolling section that must be in the observed area before the current section is triggered. Use a value between 0 and 1.
                        type: number

                      
            id: in_page_nav
label: 'In page navigation'
description: 'The in-page navigation allows navigation to specific sections on a lengthy content page.'
group: Navigation
homepage: 'https://designsystem.digital.gov/components/in-page-navigation/'
slots:
    content:
        id: content
        label: Content
        description: 'Page content.'
props:
    content_selector:
        id: content_selector
        label: data-main-content-selector
        description: 'The element the component pulls headers from. Last part will be added to the main tag.'
        schema:
            type: string
    title_heading_level:
        id: title_heading_level
        label: data-title-heading-level
        description: 'The heading level of the navigation title header.'
        schema:
            type: integer
            enum:
                - 2
                - 3
                - 4
                - 5
                - 6
    title_text:
        id: title_text
        label: data-title-text
        description: 'The text of the navigation title header.'
        schema:
            type: string
    scroll_offset:
        id: scroll_offset
        label: data-scroll-offset
        description: 'Number of pixels scroll should offset from the top of the parent element.'
        schema:
            type: number
    root_margin:
        id: root_margin
        label: data-root-margin
        description: 'Observable margin around the observed root used for calculating the current active section. Use values similar to CSS margin.'
        schema:
            type: string
    threshold:
        id: threshold
        label: data-threshold
        description: 'Percentage of the scrolling section that must be in the observed area before the current section is triggered. Use a value between 0 and 1.'
        schema:
            type: number
examples:
    preview:
        id: preview
        label: Preview
        renderable:
            '@component': in_page_nav

          
<div class="usa-in-page-nav-container"> <aside class="usa-in-page-nav" data-title-text="" data-title-heading-level="h" data-scroll-offset="" data-root-margin="" data-threshold="" data-main-content-selector=""> </aside> <main id="main-content" class="main-content"> </main> </div>