Skip to content

CdsMain

The main area of the application: CdsMain is the place where the content of the page lands. Inside CdsLayout it indents itself by the height of the header and the footer and by the width of the side drawers, so the content never has to be moved by hand.

Storybook GitLab
Test coverage: 100% — good coverage
API in specs
1 / 1 props, events, slots and exposed members with a test
Test cases
4 unit · 0 browser
Code coverage
100% lines · 92.9% branches measured in v4.0.0-alpha.13
A11y (axe)
1 recommendations in 1 stories measured in v4.0.0-alpha.11

Put the content into CdsPage — it calculates the minimum height of the page. CdsMain works only inside CdsLayout: outside the layout it renders nothing and warns about it in the console.

Scenarios ​

The main area of the application ​

CdsMain renders as a main tag — one semantic content area per page. The paddings are recalculated on the fly: minify a drawer, hide the header — and the content immediately takes the freed space.

API ​

Slots

NameTypeDescription
defaultanyMain content of the application (CdsPage).