Description
Layout.Stack
is an outer block element for wrapping content to get the correct layout and spacing between region and region headings.
Accessibility
It uses a seciton
element. Which allows you to add an aria-label
or aria-labelledby
to provide screen readers with landmarks.
Main heading
Content inside a landmark ...
<Layout.Stack aria-labelledby="unique-id"> <Layout.MainHeading id="unique-id">Main heading</Layout.MainHeading> <Layout.Card> <P>Content inside a landmark ...</P> </Layout.Card> </Layout.Stack>
Demos
Text only
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus pharetra elit in bibendum. Vivamus tincidunt eleifend tellus at tempus.
<Layout.Stack> <P> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus pharetra elit in bibendum. Vivamus tincidunt eleifend tellus at tempus. </P> </Layout.Stack>
With paragraphs
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus pharetra elit in bibendum. Vivamus tincidunt eleifend tellus at tempus.
Praesent nunc ipsum, convallis eget convallis gravida, vehicula vitae metus. Fusce volutpat risus vitae lectus elementum, sed facilisis augue dignissim. Donec accumsan, purus commodo bibendum finibus, lacus leo lobortis lorem, maximus posuere mi justo et ipsum.
<Layout.Stack> <P> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus pharetra elit in bibendum. Vivamus tincidunt eleifend tellus at tempus. </P> <P> Praesent nunc ipsum, convallis eget convallis gravida, vehicula vitae metus. Fusce volutpat risus vitae lectus elementum, sed facilisis augue dignissim. Donec accumsan, purus commodo bibendum finibus, lacus leo lobortis lorem, maximus posuere mi justo et ipsum. </P> </Layout.Stack>
With main heading
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus pharetra elit in bibendum. Vivamus tincidunt eleifend tellus at tempus.
<Layout.Stack> <Layout.MainHeading>Heading</Layout.MainHeading> <P> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus pharetra elit in bibendum. Vivamus tincidunt eleifend tellus at tempus. </P> </Layout.Stack>
With Card
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus pharetra elit in bibendum. Vivamus tincidunt eleifend tellus at tempus. Aliquam at felis rutrum, luctus dui at, bibendum ipsum.
<Layout.Stack> <Layout.Card> <P> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus pharetra elit in bibendum. Vivamus tincidunt eleifend tellus at tempus. Aliquam at felis rutrum, luctus dui at, bibendum ipsum. </P> </Layout.Card> </Layout.Stack>
With Card and heading
Main heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus pharetra elit in bibendum. Vivamus tincidunt eleifend tellus at tempus. Aliquam at felis rutrum, luctus dui at, bibendum ipsum.
<Layout.Stack> <Layout.MainHeading>Main heading</Layout.MainHeading> <Layout.Card> <P> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus pharetra elit in bibendum. Vivamus tincidunt eleifend tellus at tempus. Aliquam at felis rutrum, luctus dui at, bibendum ipsum. </P> </Layout.Card> </Layout.Stack>
With Card and headings
Main heading
Sub heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus pharetra elit in bibendum. Vivamus tincidunt eleifend tellus at tempus. Aliquam at felis rutrum, luctus dui at, bibendum ipsum.
<Layout.Stack> <Layout.MainHeading>Main heading</Layout.MainHeading> <Layout.SubHeading>Sub heading</Layout.SubHeading> <Layout.Card> <P> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus pharetra elit in bibendum. Vivamus tincidunt eleifend tellus at tempus. Aliquam at felis rutrum, luctus dui at, bibendum ipsum. </P> </Layout.Card> </Layout.Stack>