How it works
A textbook figure of fold geometry. A paper ring (radius 6 cm, hole 1.5 cm) carries twelve radial creases, alternately mountain (solid) and valley (dashed), drawn as an axonometric line drawing in neutral tones over the dashed print of the flat ring. The slider sets the valley fold angle; because every panel stays a flat 30° sector, the mountain folds follow and the ring rises into a pleated cup. The outer edge is traced in the accent: it zigzags through the folds yet stays 37.7 cm long, while the cup's width shrinks. The row under the figure shows the crease pattern with the mountain fold angle, the edge length and the width; three presets jump to flat, a right angle (90°) and full.
Use it for
- Teaching fold angles, mountain and valley creases, or why folding keeps lengths and areas.
- Showing how one input angle drives a rigid folded form, with the derived values next to it.
Look elsewhere when
- Arbitrary crease patterns or simulating paper bending; this figure folds one fixed pleated ring.
- Choosing a plain number; use a regular slider.
Usage
import { PleatedLightCrown } from './PleatedLightCrown.jsx'
export function PleatLesson() {
return (
<PleatedLightCrown
defaultValue={90}
labels={{ title: 'Pleating a paper ring' }}
onChange={(valley, { mountain, width }) => console.log(valley, mountain, width)}
/>
)
}Props
| Prop | Type | Default | What it does |
|---|---|---|---|
value | number | — | Controlled valley fold angle in degrees, from 0 (flat) to 150 (the deepest fold). Pair with onChange. |
defaultValue | number | 90 | Starting valley fold angle when uncontrolled; Reset returns to it. |
onChange | (valley: number, info: { reason: 'press' | 'drag' | 'tap' | 'key' | 'preset' | 'reset' | 'cancel', mountain: number, width: number }) => void | — | Called with the new valley fold angle, the matching mountain fold angle (degrees) and the cup's width (cm). A glide after a preset reports only its target. |
step | number | 1 | Keyboard step in degrees; Shift, Page Up and Page Down move 10°. |
labels | object | — | Replace any text: title, caption, valley, mountain, edge, width, presets, flat, right, full, valueText ({valley}, {mountain}), figure ({valley}), reset. |
locale | string | 'en' | Locale used to format angles and lengths. |
Accessibility
- The slider has a label and announces both fold angles. Arrows move 1°, Shift or Page keys 10°, Home and End jump to flat and full. Presets are toggle buttons with aria-pressed.
- On touch, a press on the track waits for a sideways move so the page can still scroll; the thumb drags at once. A cancelled touch restores the angle. Presets and Reset reach 44 pixels on touch.
Motion
A preset or Reset glides to its angle over about 240–480ms with an ease-out curve; dragging follows the pointer directly. Reduced motion jumps to the angle with no glide.
Add it to your project
Pro members copy a prompt and their coding agent installs the source, the same way as the free components.
PleatedLightCrown.jsxpleated-light-crown.csstokens.cssREADME.md
Both files install together. The stylesheet reads the design tokens in tokens.css and carries fallbacks, so it also works alone.







