Agriculture Design System
Beta
Design System for the Export Service

App layout

The app layout provides a consistent way for users to navigate around a web application and access their account settings.

View in StorybookView in Github
import { ... } from '@ag.ds-next/react/app-layout';

Usage

App layout components can be imported via the app-layout entrypoint in the @ag.ds-next/react package.

For example:

import { ... } from '@ag.ds-next/react/app-layout';

Props

AppLayout Props
PropTypeDescription
children?ReactNode
focusMode?booleanDefault: false
Set to `true` while users are completing multi-page forms to reduce distractions. When true, the app layout sidebar will not be rendered.
AppLayoutHeader Props
PropTypeDescription
headingstring
The heading should be set to the website or service title.
hrefstring
The href to link to, for example "/".
logoElement
The logo to display.
accountDetails?{ name: string; secondaryText?: string; href?: string; dropdown?: ReactNode; } | undefined
Details for the authenticated account.
badgeLabel?string
Used to indicate if an application is in a prerelease state.
id?string
Defines an identifier (ID) which must be unique.
subLine?string
Used to provide additional information to describe your website or service.
AppLayoutSidebar Props
PropTypeDescription
items(NavItem[] | { items: NavItem[]; options?: { disableGroupPadding: boolean; } | undefined; })[]
Groups of navigation items to display.
activePath?string
Used for highlighting the active element.
AppLayoutContent Props
PropTypeDescription
children?ReactNode
AppLayoutFooter Props
PropTypeDescription
children?ReactNode
id?string
Defines an identifier (ID) which must be unique.

AppLayoutFooterDivider Props

AppLayoutFooterDivider does not have any props.

Source

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