A quick way to create a layout.

<web-panels>
  <panel top>Main menu</panel>
  <panel left>Filter</panel>
  <panel main>Content</panel>
  <panel right>Inspector</panel>
  <panel bottom>Status bar</panel>
</web-panels>
Browser preview
<panel top>...</panel> <panel left>...</panel> <panel main>...</panel> <panel right>...</panel> <panel bottom>...</panel>

API reference

Attributes on <web-panels>

AttributeValuesEffect
cssfrom default (default when absent), demo, css Selects the style preset written into the shadow <style>. Changing it at runtime re‑styles immediately; leaving demo also clears the inline colors it added.

No other attributes are observed. Anything else you set on the host is ignored (but still styleable from your page).

Attributes on <panel>

AttributeGrid areaNotes
mainmainCentre cell, 1fr wide and tall.
toptopSpans all three columns.
bottombottomSpans all three columns.
leftleftMin width 300px.
rightrightMin width 300px.
overlay—Takes the panel out of flow (position: absolute). Combine with a direction.
overlay leftmainPinned to the left edge of main, full height, z-index: 10. 80% wide under 767px.
overlay rightmainPinned to the right edge of main, full height, z-index: 10. 80% wide under 767px.
overlay toptopFull width, z-index: 20.
overlay bottombottomFull width, z-index: 20.
sticky—position: sticky; adds top: 0 with top and bottom: 0 with bottom. Only has room to move if the panel's row is taller than the panel.
none—Auto‑placed by the grid in document order.

What it does

Things to watch out for

Contact

Any questions, recommendations, or comments on this web component? Feel free to help me improve.