Skip to content
English
Nets and folding comes with Pro. Its preview shows once you unlock it.

How it works

A textbook figure of a net folding into a solid. The net is an axonometric line drawing in neutral tones lying on its own dashed outline. Each step turns one face about its fold line: by 90° for the cube, 125.3° for the pyramid's triangles and 109.5° for the tetrahedron, the angles that close each solid. The face folded in the current step is the one shape in the accent colour, with its number in an accent badge; fold lines that are still flat stay dashed. The row under the figure says what the step does and, once the solid is closed, checks Euler's formula with its vertices, edges and faces.

Use it for

  • Teaching nets of polyhedra: which flat pattern folds into which solid, and in what order.
  • Showing a step-by-step physical process where each step turns one part about a hinge.

Look elsewhere when

  • Free 3D rotation of a model; this figure keeps one fixed axonometric view.
  • Long procedures with many branches; use a regular stepper or a list.

Usage

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

export function CubeNet() {
  return (
    <HingedExhibition
      solid="cube"
      defaultStep={0}
      labels={{ title: 'Net of a cube' }}
      onStepChange={(step, { closed }) => console.log(step, closed)}
    />
  )
}

Props

PropTypeDefaultWhat it does
solid'cube' | 'pyramid' | 'tetrahedron''cube'The net: six squares in a cross (5 folds), a square with four equilateral triangles (4 folds), or four equilateral triangles (3 folds).
stepnumber—Controlled number of folds made, from 0 (flat) to the number of fold lines (closed). Pair with onStepChange.
defaultStepnumberhalf the folds, rounded upStarting number of folds when uncontrolled.
onStepChange(step: number, info: { flat: boolean, closed: boolean }) => void—Called when a button or key asks for another step, with the new number of folds.
labelsobject—Replace any text: title, caption, solids { cube, pyramid, tetrahedron }, flatTitle, flatText ({faces}, {folds}), foldTitle ({face}), foldText ({angle}), closedTitle ({solid}), closedText ({v}, {e}, {f}), counter ({n}, {count}), figure, previous, next.
localestring'en'Locale used to format the fold angle.

Accessibility

  • Tab reaches the two step buttons; Enter or Space folds or unfolds one step. While focus is inside the card, Left and Right step, Home flattens the net and End closes the solid.
  • At either end the button stays focusable with aria-disabled, so focus is never lost. A polite live region announces the fold number, the step title and its text. Both buttons are 44 pixels.

Motion

One step folds or unfolds the face over 560ms with an ease-in-out curve; Home and End land at once. Reduced motion shows each step at once, with the same accent face and caption.

Add it to your project

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

HingedExhibition.jsxhinged-exhibition.csstokens.cssREADME.md

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

Cards
Animated border card comes with Pro. Its preview shows once you unlock it.
Border beam comes with Pro. Its preview shows once you unlock it.
Card lock sheet comes with Pro. Its preview shows once you unlock it.