#610
Map, split and page
A PageFrame floating a 352px panel over a stand-in map, with a mode switch (map, split, page), a side switch and a live readout of the covered pixels from stageInsets.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Map, split and page" pattern (@codeatlasdev/ui demo #610, layout/page-frame) in my app.
Call get_demo({ ids: ["#610"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Map-first screens where a panel sits over a live stage and the stage must keep pins and routes clear of what the panel covers.
Keep these library parts, with the props and tokens the demo uses:
- PageFrame, Button, TextField, SegmentedControl, stageInsets from "@codeatlasdev/ui"
Behaviour to keep:
- A 380px tall frame holds a map stand-in and `<PageFrame mode={mode as 'map' | 'split' | 'page'} side={side as 'left' | 'right'} width="sm" label="Territory" headerBorder>`
- `{#snippet header()}` has an h2 Territory and a line reading the covered px from `stageInsets.current`
- `{#snippet toolbar()}` has a `TextField` labelled Search
- Body holds two `SegmentedControl`s: Mode (Map, Split, Page) and Side (Left, Right)
- `{#snippet footer()}` has a filled small `Button` Save
- A pin on the map shifts with the covered area
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- PageFrame
@codeatlasdev/ui - Button
@codeatlasdev/ui - TextField
@codeatlasdev/ui - SegmentedControl
@codeatlasdev/ui
How it is built
- A 380px tall frame holds a map stand-in and `<PageFrame mode={mode as 'map' | 'split' | 'page'} side={side as 'left' | 'right'} width="sm" label="Territory" headerBorder>`
- `{#snippet header()}` has an h2 Territory and a line reading the covered px from `stageInsets.current`
- `{#snippet toolbar()}` has a `TextField` labelled Search
- Body holds two `SegmentedControl`s: Mode (Map, Split, Page) and Side (Left, Right)
- `{#snippet footer()}` has a filled small `Button` Save
- A pin on the map shifts with the covered area
Related
Loading source.