Details
The Details component hides non-essential content unless a user explicitly chooses to view it.
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
| Prop | Type | Description |
|---|---|---|
| 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.