Import
import { Flex } from '@dnb/eufemia'
Description
Flex.Stack
is an outer block element for wrapping content to get the correct layout and spacing between region and region headings.
It uses Flex.Container under the hood.
Accessibility
It uses a section
element. Which allows you to add an aria-label
or aria-labelledby
to provide screen readers with landmarks.
Code Editor
<Flex.Stack aria-labelledby="unique-id"> <Form.SubHeading id="unique-id">Heading</Form.SubHeading> <Card> <P>Content inside a landmark ...</P> </Card> </Flex.Stack>