Draft Form
Web (React)
A turning wireframe solid inked on a drafting guide, in your theme's colours.
A canvas wireframe that turns in 3D over a dashed crosshair and registration circle, like a figure on a drafting sheet. Edges are drawn in the foreground ink with depth fading and the vertices are dotted in the primary colour, so it follows light and dark mode and the palette picker. Choose a nested icosahedron, a stellated cube or two interlocking cylinders. It pauses when off screen and draws a still frame when the user prefers reduced motion.
Installation
CLI
npx @modus-ui/cli add draft-formManual
- Copy the code from the component tab.
- Create a file at
components/ui/draft-form.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "cube" | "cylinders" | "sphere" | "sphere" | Which form to draw. |
speed | number | 1 | Rotation speed multiplier (0 to 3). |
size | number | 1 | Line width multiplier. |
length | number | 1 | Scale of the form itself (0.35 to 2.5). |
opacity | number | 1 | Opacity of the canvas. |
hue | number | 0 | Hue rotation in degrees. |
saturation | number | 1 | Saturation multiplier. |
brightness | number | 1 | Brightness multiplier. |
color | string | none | Any CSS colour for edges and vertices; defaults to the theme's ink. |
className | string | none | Extra classes for the wrapper. |
Comments