Agriculture Design System
Beta
Design System for the Export Service

Side nav

A vertical list of links used for site navigation, typically placed beside body content.

View in FigmaView in StorybookView in Github
import { ... } from '@ag.ds-next/react/side-nav';

Usage

Side nav components can be imported via the side-nav entrypoint in the @ag.ds-next/react package.

For example:

import { ... } from '@ag.ds-next/react/side-nav';

Props

SideNav Props
PropTypeDescription
activePathstring
Used for highlighting the active element.
itemsSideNavMenuItem[]
The list of links.
titlestring
The title is placed at the top of the list of links.
background?"body" | "bodyAlt"Default: "body"
If SideNav is placed on 'bodyAlt' background, please set this to 'bodyAlt'.
collapseTitle?string
@deprecated Unused. The title is now always used, even when collapsed.
subLevelVisible?"always" | "whenActive"Default: "whenActive"
When to show sub-level navigation items.
titleLink?string
If provided, the title will be rendered as an anchor element.

Source

You can view the full source code for this package on Github.