How it works › Frames

Frames

How a <data-views> sits in its page. Zach, on robotparts.dev: "I don't like how the table and gallery seem like separate components… caused by the additional border." One attribute, frame, and nothing changes unless a host sets it.

frame =

One element, six frames

Live

The GIM4305 datasheet case with its whole toolbar. Pick a frame above: the element re-makes its view on the new scroller and keeps its view, filters and search.

The live view starts when it scrolls into sight.

From the example GIM4305-10 datasheet

index.html
<data-views src="views.base" frame="boxed"></data-views>

The six frames

frameBorderSurfaceScrollsLooks like
boxed1 px boxheader bandthe box's owntoday's look; the default
flushnonenonethe box's ownno border, rules only
tabsnonenonethe box's owntabs as the page's nav, zebra rows
sheetnonetinted header and wellthe box's ownpill tabs, white tiles on the tint
pagenonenonethe page'sa sticky band; scrolls with the page
bleednonetinted sticky bandthe page'sedge to edge across the column

page and bleed scroll with the page

The element is as tall as its rows and the nearest scrolling ancestor (else the window) scrolls them. The band (tabs, toolbar, count) sticks to the top, the table's header sticks under it, a wide table's sideways scrollbar is pinned to the bottom, and the side peek is pinned to the visible box. Two optional host tokens: --data-sticky-top (the height of a host's own sticky header; this site sets 57 px) and --data-bleed (the side padding bleed reaches across).

Comes from docs/CONTRACT.md §12 (frame) in docs/.