Chart Recorder
motiq/chart-recorderFreeComponent
Five spectrum lanes written live by glowing pens: data packets stream the traces, hot ink cools into a settled trail, and event markers bloom rings as the pens cross them. One canvas + a single rAF loop; committed dark Motion Lab palette; reduced-motion static frame, offscreen-paused, forced-colors fallback.
Live preview
live · rendered by the registry
Rendered by motiq on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.motiq.dev/r/chart-recorder.jsonSource
1"use client";23import * as React from "react";45import { cn } from "@/lib/utils";6import { useReducedMotion, useVisibilityPause } from "@/lib/motiq";78/* -------------------------------------------------------------------------- */9/* Types */10/* -------------------------------------------------------------------------- */1112export interface ChartRecorderRect {13 /** 0–1 left edge of the readable safe area. */14 x: number;15 /** 0–1 top edge of the readable safe area. */16 y: number;17 /** 0–1 width of the readable safe area. */18 w: number;19 /** 0–1 height of the readable safe area. */20 h: number;21}2223export interface ChartRecorderProps extends React.HTMLAttributes<HTMLDivElement> {24 /** Number of instrument lanes (2–5). Default 5 (the full violet→cyan spectrum). */25 lanes?: number;26 /** Tick/lattice detail density multiplier. ~0.6–1.6. */27 density?: number;28 /** Overall ink luminance/glow of the field (0–1.4). */29 intensity?: number;30 /** Pen-sweep speed multiplier. 0 freezes on a single rich still frame. */31 speed?: number;32 /** Region where lanes thin/quiet down so foreground text stays readable (0–1 coords). */33 safeArea?: ChartRecorderRect;34 /**35 * Violet end of the lane spectrum (any CSS color). Overrides lane 0's fixed36 * Motion Lab hue (`#9e84ff`); the remaining lanes always keep their exact37 * lab colors. Omit to use the fixed lab spectrum as-is.38 */39 accent?: string;40 /** Deterministic seed for the generated geometry (SSR-stable). */41 seed?: number;42 /** Pause the sweep when scrolled offscreen or the tab is hidden. */43 pauseWhenHidden?: boolean;44 /** Force the static, motion-free variant regardless of system preference. */45 reducedMotion?: boolean;46}4748/* -------------------------------------------------------------------------- */49/* Deterministic model */50/* -------------------------------------------------------------------------- */5152/** mulberry32 — no Math.random / Date.now at render or module scope (SSR-stable). */53function makeRng(seed: number) {54 let a = seed >>> 0;55 return () => {56 a = (a + 0x6d2b79f5) | 0;57 let t = Math.imul(a ^ (a >>> 15), 1 | a);58 t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;59 return ((t ^ (t >>> 14)) >>> 0) / 4294967296;60 };61}6263const clamp = (n: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, n));64// … truncated
What it pulls in
Other registry items
Files it writes
More from motiq
All 100 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Activity Streamactivity-stream | motiq | Components | Free | 1 dep | |
| Adaptive Safe-Zone Gridadaptive-safe-zone-grid | motiq | Components | Free | no deps | |
| Agent Run Timelineagent-run-timeline | motiq | Components | Free | 1 dep | |
| AI Response Streamai-response-stream | motiq | Components | Free | 1 dep | |
| Animated Accordionanimated-accordion | motiq | Components | Free | 2 deps | |
| Animated Buttonanimated-button | motiq | Components | Free | 1 dep | |
| Animated Dialoganimated-dialog | motiq | Components | Free | 2 deps | |
| Animated Gridanimated-grid | motiq | Components | Free | 2 deps |
