Layout

Build a page structure from a header, sidebar, body, and footer.

Live preview
Interact with the component to see results here.
View code
HTML
<sy-layout style="--layout-min-height:280px">
  <sy-layout-header size="small"
    style="background:rgba(103,80,164,.07);border:1px solid rgba(103,80,164,.15);"
  >
    <div style="padding:16px;overflow-wrap:anywhere">Header</div>
  </sy-layout-header>
  <sy-layout-sider size="28%"
    style="background:rgba(103,80,164,.07);border:1px solid rgba(103,80,164,.15);"
  >
    <div style="padding:16px;overflow-wrap:anywhere">Side navigation</div>
  </sy-layout-sider>
  <sy-layout-content
    style="background:rgba(103,80,164,.07);border:1px solid rgba(103,80,164,.15);"
  >
    <div style="padding:16px;overflow-wrap:anywhere">The area containing the
      page's main content.</div>
  </sy-layout-content>
  <sy-layout-footer size="small"
    style="background:rgba(103,80,164,.07);border:1px solid rgba(103,80,164,.15);"
  >
    <div style="padding:16px;overflow-wrap:anywhere">Footer</div>
  </sy-layout-footer>
</sy-layout>

Usage guide

#

Build the app's header, sidebar, body, and footer structure. Place each region directly inside Layout.

Header / Footer
size specifies height. Use small, medium, large, or a CSS size.
Sider
size specifies width. Place it after Content to position it on the right.
Content
Fill the remaining content area. Each direct child region is assigned to its slot automatically.

Feature examples

#

Choose a feature from 4 topics. Explore property settings, method calls, event results, and slot layouts through live examples and code.

Usage examples · Overview

Try the selected example. Topics with multiple configurations let you switch between detailed examples.

View code
HTML
Loading the example.

Property · Size

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Methods · None

Use the example's buttons to call methods and inspect their results.

View code
HTML
Loading the example.

Events · None

Interact with the component to see event names and payloads in the live preview below.

View code
HTML
Loading the example.

API reference

#

Hover over a name or focus it with the keyboard to see the code. On touch screens, tap the name.

<sy-layout>

Slots

SlotDescription
Content displayed in the header area.
Content displayed in the sider-start area.
Content displayed in the content area.
Content displayed in the sider-end area.
Content displayed in the footer area.
Component body or child items.

<sy-layout-header>

Properties

Attribute / PropertyTypeDefaultDescription
LayoutSize'medium'Header height: small, medium, large, or a CSS length.

Slots

SlotDescription
Component body or child items.

<sy-layout-sider>

Properties

Attribute / PropertyTypeDefaultDescription
LayoutSize'medium'Sidebar width: small, medium, large, or a CSS length.

Slots

SlotDescription
Component body or child items.

<sy-layout-content>

Slots

SlotDescription
Component body or child items.

<sy-layout-footer>

Properties

Attribute / PropertyTypeDefaultDescription
LayoutSize'medium'Footer height: small, medium, large, or a CSS length.

Slots

SlotDescription
Component body or child items.