Panel
The surface docked beside a live map: one subject — a parcel's report, a design being built — while the map behind it stays fully usable.
The panel
Live, on a stand-in canvas. Scroll the body and the header's rule arrives; close it and it enters again from its own edge.
Panel, header or drawer
Three surfaces that all put a title over some content, and the differences are contracts rather than looks.
- Not GdPageHeader — that is a full-bleed band opening a DOCUMENT, carrying the page's one
<h1>. A panel floats over a canvas and its title is a subject, not a page. - Not GdDrawer — the drawer is a native
<dialog>opened withshowModal(): focus trapped, everything behind it scrimmed and inert, Escape answered from anywhere. Every one of those is right for a settings sheet and is the opposite of what a panel needs. - So: a plain
<aside>— complementary to the map, which stays the main content. No trap, no scrim, noinert, nothing stacked above--gd-z-panel.
Non-modal is the whole point: the user reads the report AND pans, clicks the next lot, toggles a layer. A surface that makes the map unreachable while describing a piece of it has misunderstood the job.
The earned hairline
At rest GdPanelHeader has no bottom border. The rule and its scroll shadow arrive only once the body beneath has actually moved.
A header that always carries a rule reads as detached from the panel it belongs to. The line is a claim that there is content above the fold, and at scrollTop: 0 that claim is false. GdPanelFooter's rule is unconditional for the same reason inverted: a footer always has content above it, so its line is a fact rather than a claim.
- The header watches the scrolling element itself, passed as
scroller— every panel that hand-rolled this wrote the same passive listener and then got the reset wrong. - A programmatic
scrollTop = 0— a new selection, a tab swap — fires no scroll event, which strands the rule on over a body that is back at the top. Call the exposedsync()after any scroll you set from code;GdSidePanel.scrollToTop()already does. - The border fades, the shadow does not: animating a shadow repaints the full width of the body's top edge every frame, for a mark nobody watches arrive.
The parts
Usable without GdSidePanel — a bottom sheet on a phone, a drawer's body, a card that wants the same spine.
Header
42 Jarrah Street
Section
The lot
What is on the land
The label is a real heading, not a styled span: a panel with twelve unlabelled blocks is a panel a screen-reader user has to read linearly to navigate.
Footer
It pins two ways on purpose: as the last flex child of a panel column it is simply inert and the body scrolls past it; dropped inside a scrolling body it sticks to the bottom edge. The safe-area inset is not decoration — on a phone this bar is the bottom of a sheet resting on the home indicator, and without it the panel's primary action sits under the gesture bar.