You are viewing a PR preview for PR #1506

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
headingstringThe heading should be set to the website or service title.
hrefstringThe href to link to, for example "/".
logoElementThe logo to display.
accountDetails?{ name: string; secondaryText?: string; href?: string; dropdown?: ReactNode; } | undefinedDetails for the authenticated account.
badgeLabel?stringUsed to indicate if an application is in a prerelease state.
id?stringDefines an identifier (ID) which must be unique.
subLine?stringUsed 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?stringUsed for highlighting the active element.
AppLayoutContent Props
PropTypeDescription
children?ReactNode
AppLayoutFooter Props
PropTypeDescription
children?ReactNode
id?stringDefines 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.