Layout

Generators combine two questions — what goes on the canvas (left) and what does it look like (right) — into one of five layouts. The platform's own generators cover all five; yours starts from the template closest to it.

The five templates

#TemplateLeftRightUse it when
1layout-1-params.htmlnone320 paramsNothing to pick or generate; the user only adjusts values
2layout-2-templates.html320 templates320 paramsOne left-side job: browse and pick a template
3layout-3-generate.html320 generate, docked320 paramsStart from an input (prompt, style, image), then tune
4layout-4-floating.html360 generate, floatingnonePick a style, set the run up in a dialog, nothing to tune afterwards
5layout-5-multi.html64 tools + 320 panel320 paramsSeveral left-side jobs: generate, templates, import

If you cannot decide between 3 and 4, there is one question: is anything adjusted after generating? If yes, 3. If the result is final, 4.

1 No left rail + params
2 Templates 320 + params
3 Generate 320 docked + params
4 Generate 360 floating, no params
5 Tools 64 + panel 320 + params

Five combinations, one skeleton: something to pick or generate on the left, the result in the middle, what to adjust on the right, and export (the dark block) always bottom-right.

Each template comes in two forms. The skeleton (<layout>.skeleton.html) is the structure plus the full stylesheet with the script block removed — read this one when you write markup, because nothing in it competes with the layout and the tokens for attention. The runnable form (the same URL without .skeleton) has the behaviour inlined as well, for seeing the example work; what its controls do is a demo, not the spec. Both are a single HTML file with no second file to copy alongside.

Every control in it works — reset, the unit toggle, drag-to-change on numeric fields, zoom, the select, collapse, the Fabrication Tips walkthrough, the second-level views. The export button is the one stand-in: it says what the platform would do. Try them below, then download one and drop it into your project.

Layout template · skeleton + runnable HTML · layout-1-params.html Download Open in new tab
Layout template · skeleton + runnable HTML · layout-2-templates.html Download Open in new tab
Layout template · skeleton + runnable HTML · layout-3-generate.html Download Open in new tab
Layout template · skeleton + runnable HTML · layout-4-floating.html Download Open in new tab
Layout template · skeleton + runnable HTML · layout-5-multi.html Download Open in new tab

Regions

RegionWidthWhat is in it
Platform top bar64The platform draws it — never add a second one
Tool rail64Layout 5 only: one icon per left-side panel
Left rail320, or 360 when floatingWhat there is to add or to generate: templates, styles, a prompt, an import
Canvaseverything the rails leaveThe preview, plus four overlays: view tabs, Fabrication Tips, zoom, and export when there is no parameters rail
Parameters rail320The stack of property cards, with export pinned at the bottom

Rails are fixed width. The canvas absorbs every resize: when the window gets wider, the parameters rail does not.

Docked regions have no gap and no radius between them — a docked rail meets the canvas at a single 1px stroke-default line. The floating rail is the one exception: a white card, 12px radius, shadow-100, inset 16px from the canvas's top, start and bottom edges.

Left rails collapse to a 40px pill in the canvas's top-start corner (rail title plus the panel icon), and the canvas grows. In layout 5 the panel collapses by clicking the already-selected tool.

The parameters rail is always 320px and always the same three bands:

  • Header row — unit toggle at the start, Reset at the end
  • Middle — a scrolling stack of property cards
  • Footer — the export button, pinned so nobody has to scroll to find it

Derived results (usage, part count, duration) are annotations on the canvas, or one card at the bottom of the stack. They never get a column of their own.

The four corners of the canvas

The canvas carries four overlays and nothing else: view tabs at the top centre, the Fabrication Tips capsule at the top end, the zoom cluster at the bottom start. The fourth is export, and it appears at the bottom end only when there is no parameters rail. Overlays do not move on hover.

Zoom is a free value, not a set of steps: the wheel and a two-finger pinch scale the canvas continuously and anchor on the pointer, dragging the canvas pans it, the readout is a menu button whose menu lists a few levels as shortcuts, and fit measures the canvas and re-centres. Which levels the menu lists, and how far the range goes, is yours to decide.

A lead rail can hold a second level: "View all" on a section, or the history row at the rail's foot, replaces the rail's content with a back row and a three-column grid of 90px tiles. The canvas does not change and no dialog opens; Back is the only way out.

The view switch is a segmented control, not a tab strip: two or three mutually exclusive views (2D design / 3D preview / Export). More than three means the canvas is carrying too much. The capsule at the top end opens the Fabrication Tips walkthrough and nothing else.

Property cards

Parameters are grouped by object or by function into property cards: white, stroke-divider border, an 8px radius on all four corners and shadow-100, stacked 12px apart on the bg-subtlest panel. A card is a header row plus the field rows under it. The header row is one <button aria-expanded> across the full width, title at the start and disclosure chevron at the end. The card itself is a <section> pointed at that header with aria-labelledby.

Cards with few parameters stay open; cards with many may start collapsed. Collapsing changes two things and nothing else: hidden on the body, and the chevron's rotation. No height animation.

A field row is label ⋯ control, 8px vertical and 16px horizontal padding, label in text-primary, control aligned to the end. The kind of value decides the control: a number takes a 92px input, a choice a 110px select, a range a slider with the number beside it, on/off a switch, a colour a 24px swatch.

Shape
mm
Color
Fill mode

The second card starts collapsed: the header row stays, the chevron flips, the card is one row tall. Click the header to open it.

Flow and states

The layout has to make the flow obvious: pick or input → configure → generate → review → export. Live-preview generators redraw as a slider moves, so they have no generate step; adding a Generate button to one is a defect.

The preview has three states and all three need designing:

  • Empty — examples or a hint, never a blank rectangle
  • Computing — a stage name, a number, and a way to cancel; never an indefinite spinner
  • Done — zoom, pan, compare, regenerate

Errors belong beside the control that caused them, together with the next action. A toast at the top of the screen is where errors go to be missed.

Sizing and scrolling

Your width is the region the platform allocates, not the viewport, so adapt with container queries. Below 960px the three regions stack, canvas first and rails after, and the export button stays pinned to the bottom.

Rails scroll inside themselves with thin scrollbars. Never introduce horizontal scrolling, and never nest one scroll container inside another. A panel that fills its space and scrolls needs both flex: 1 and min-height: 0. flex: 1 makes it grow; min-height: 0 lets it shrink below its content. Without the second, a flex child keeps its default min-height: auto, refuses to shrink, and overflows instead of scrolling. Every scroll container in the templates carries the pair.

Esc
Search all docs · to navigate · to open