You are viewing a PR preview for PR #1506

Agriculture Design System
Beta
Design System for the Export Service

Details

The Details component is used to provide users information and links that are helpful but not essential for all users to see.

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

Usage

Details components can be imported via the details entrypoint in the @ag.ds-next/react package.

For example:

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

Props

Details Props
PropTypeDescription
children?ReactNode
iconBefore?booleanDefault: "false"If true, the InfoIcon will be shown.
label?stringDefault: "Details"The label that will be present in the trigger.
onBodyAlt?booleanDefault: "false"If the Details component is placed on a page with `bodyAlt` background, set this prop to `true`.
ref?Ref<HTMLDetailsElement>

Source

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