Side Navigation (side_navigation)

Hierarchical, vertical navigation to place at the side of a page.

🔗 External documentation.

ID Label Description Schema
items Menu items Full-height and lightweight navigation (including support for dropdowns).
                        type: array
items:
    type: object
    properties:
        title:
            type: string
        attributes:
            $ref: '#/$defs/attributes_value'
        below:
            type: object

                      
            id: side_navigation
label: 'Side Navigation'
description: 'Hierarchical, vertical navigation to place at the side of a page.'
group: Navigation
homepage: 'https://designsystem.digital.gov/components/side-navigation/'
props:
    items:
        id: items
        label: 'Menu items'
        description: 'Full-height and lightweight navigation (including support for dropdowns).'
        schema:
            type: array
            items:
                type: object
                properties:
                    title:
                        type: string
                    attributes:
                        $ref: '#/$defs/attributes_value'
                    below:
                        type: object
examples:
    preview:
        id: preview
        label: Preview
        renderable:
            '@component': side_navigation
            items:
                -
                    title: Home
                    url: 'https://example.com'
                -
                    title: Library
                    url: 'https://example.com'
                    is_expanded: true
                    in_active_trail: true
                    below:
                        -
                            title: 'Sub 1'
                            url: 'https://example.com'
                            in_active_trail: true
                        -
                            title: 'Sub 2'
                            url: 'https://example.com'
                -
                    title: Data
                    url: 'https://example.com'

          
<ul class="usa-sidenav"> <li > <a class="link" href="https://example.com">Home</a> </li> <li > <a class="link usa-current" href="https://example.com">Library</a> <ul class="usa-sidenav usa-sidenav__sublist"> <li > <a class="link usa-current" href="https://example.com">Sub 1</a> </li> <li > <a class="link" href="https://example.com">Sub 2</a> </li> </ul> </li> <li > <a class="link" href="https://example.com">Data</a> </li> </ul>