Skip to content
English
Plan and axonometric view comes with Pro. Its preview shows once you unlock it.

How it works

An 8 × 3 m room drawn twice: as a plan, the orthographic view from straight above with x and y rulers, and as an axonometric view. A cube, a cylinder and a square pyramid stand in it. The plan shows only their footprints (a square, a circle, a square with its sloping edges), which is what a top view keeps; the axonometric view shows their heights. The chosen solid is drawn in the accent in both views, with dashed guides from its centre to both axes and its coordinates on the rulers. Solids snap to the grid and cannot overlap.

Use it for

  • Teach how a plan (top view) relates to a 3D view of the same objects.
  • Read and set coordinates on a plan.

Look elsewhere when

  • The room and the three solids are fixed; for a real floor plan with your own objects use a drawing tool.

Usage

import { TwinViewExhibitLayout } from './TwinViewExhibitLayout.jsx'

export function Lesson({ save }) {
  return <TwinViewExhibitLayout defaultPositions={[{ id: '02', x: 4.5, y: 1.5 }]} onChange={save} />
}

Props

PropTypeDefaultWhat it does
titlestring'Plan and axonometric view'Heading of the card.
titlesstring[]—Names of the cube, the cylinder and the pyramid, in that order.
labelsobject—Text overrides: caption, plan, model, move, left, up, down, right, instructions, position and reset. move and position take {name}; position also takes {x} and {y}.
defaultPositionsArray<{ id: string, x: number, y: number }>—Starting centres in metres from the back-left corner of the 8 × 3 m room. IDs are '01' (cube), '02' (cylinder) and '03' (pyramid); a missing one keeps its default.
step0.25 | 0.50.25Grid step in metres for dragging, the arrow keys and the pad.
onChange(positions: Array<{ id: string, x: number, y: number }>) => void—Receives all three centres after a drag, a pad press, Enter, a change of solid, leaving the card or Reset. Escape and a cancelled touch put the solid back and do not call it.
localestring'en'Locale for the coordinate numbers.
classNamestring—Extra class on the root.

Accessibility

  • Each footprint on the plan is a button: Tab reaches it and selects it, the arrow keys move it one grid step, Enter confirms and Escape puts it back. Changing solid or leaving the card also confirms.
  • The arrow pad works for touch and switch users and shows when a move is blocked by a wall or another solid. A status line reads the chosen solid and its coordinates. A cancelled touch puts the solid back.

Motion

Both views redraw directly as a solid moves, so the 3D view tracks the finger. Only colours and the pressed scale of buttons transition, and reduced motion removes those.

Add it to your project

Pro members copy a prompt and their coding agent installs the source, the same way as the free components.

TwinViewExhibitLayout.jsxtwin-view-exhibit-layout.csstokens.cssREADME.md

Both files install together. The stylesheet reads the design tokens in tokens.css and carries fallbacks, so it also works alone.

Form inputs
Availability grid comes with Pro. Its preview shows once you unlock it.
Boolean operations comes with Pro. Its preview shows once you unlock it.
Cascader comes with Pro. Its preview shows once you unlock it.