Agriculture Design System
Beta
Design System for the Export Service

Conditional field container

A standardised pattern for conditionally hiding and revealing the amount of content a user views in a form.

View in StorybookView in Github
import { ... } from '@ag.ds-next/react/conditional-field-container';

Usage

Conditional field container components can be imported via the conditional-field-container entrypoint in the @ag.ds-next/react package.

For example:

import { ... } from '@ag.ds-next/react/conditional-field-container';

Props

ConditionalFieldContainer Props
PropTypeDescription
children?ReactNode
visible?boolean
Controls the visibility and render state of the children

Source

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