A root layout provides a standardized group of containers to display content at the root level.
Preview
Base Style
A root layout consists of a header, body, sidebar and footer. Content can optionally be passed into the slots which
will be displayed in the respective area. The sidebar is designed to be responsive and will reposition above the
body according to the responsiveBreakpoint prop.
Variants and Examples
Header Sticky
Usage
Root Layout should be used as the top level component for a route. All other components on the page should be nested within one of the root layout's slots. The root layout should not be nested within any other elements or components.
Vue API
Slots
Props
Accessibility
The RootLayout component uses
Content Sectioning
elements <header>, <aside>, <main>, and <footer> which automatically define
ARIA Landmark Roles
on the page.
If you have navigation links contained within any of the slots Root Layout provides these should be enclosed in a <nav> Nav Section.
The RootLayout component will not do this for you.
The sidebar will not automatically wrap to be above the main content by default.
This can be changed via the responsiveBreakpoint prop if desired.