SM01 Interactive Demo

Toggle between container and full-height modes live

Live Demo

Grid caps at 350px and scrolls internally when content exceeds it.

Code
Container Mode
 
How it works
Container

Grid caps itself with a pixel max-height. The shadow DOM's .wg uses max-height: inherit, so the host constraint propagates into the scroll container.

Full Height

height: 100% against an unbounded parent resolves to auto, so the grid sizes to its content and the page layout grows to wrap it.

tableBorderOnly = true moves the scroll container to .wg__table-container and leaves the outer .wg with overflow: visible. Side effect: wheel events are no longer captured by the grid, so page scroll works naturally over it.

SM02 Hybrid Mode

Horizontal grid scrollbar with vertical page scrollbar for wide tables

Live Demo

Wide table with horizontal scroll. Vertical uses page scroll.

Code
Hybrid Mode
 
When to Use
Best For

Wide data tables with many columns in content-focused pages.

Benefits

Horizontal scroll contained to grid.

Vertical scroll feels native.

Common Pattern

Use max-width: 100% to fit container width while allowing horizontal scroll for wide content.

Quick Reference

ModeCSSVertical ScrollHorizontal ScrollUse Case
Containermax-height: 300pxGridGridWidgets, modals, fixed layouts
Page(none)PagePageFull-page tables, main content
Hybridmax-width: 100%PageGridWide tables in content pages

Additional Properties

PropertyTypeDefaultDescription
isScrollablebooleanfalseConstrain grid height to viewport. Enables vertical scrolling within a calculated max-height.
scrollMaxHeightstring-Custom max-height for the grid container (e.g., '500px', '80vh').
tableBorderOnlybooleanfalseOnly show border around the table, not the outer container (pagination/toolbar area).