# Frictionborn Motion > Frictionborn Motion is an open-source motion and WebGL component registry for React 19 and Next.js 16. Every item has a spec sheet generated from its code and a recorded test run. Docs: https://frictionborn.com/docs Registry: https://frictionborn.com/r GitHub: https://github.com/hunainx/frictionborn Agent Skill: npx skills add hunainx/frictionborn ## Core Principles - **Server Output is Static**: No opacity: 0 or transforms in server HTML. Hidden-before-reveal CSS only under [data-motion="ok"]. - **Single Frame Loop**: Animated items share one loop (useFrame from @frictionborn/runtime). Direct requestAnimationFrame is forbidden. - **Strict WebGL Leases**: At most 4 live WebGL contexts per page on a fine pointer, 2 on coarse. WebGL code loads only when leased. - **Reduced Motion is Architectural**: Mode is declared and verified (static, still-frame, opacity-only, or off). ## Components | Item | Slot | Summary | Spec Sheet | | :--- | :--- | :--- | :--- | | [ambient-hero](https://frictionborn.com/docs/components/ambient-hero) | `composition` | Hero composition: ambient canvas (mesh/noise/particles) + TextReveal + MagneticButton (DOM+WebGL, reduced motion -> static, mobile -> T2) | [Spec Sheet](https://frictionborn.com/r/ambient-hero.md) | | [ash-text](https://frictionborn.com/docs/components/ash-text) | `headline` | headline: One line of real text drawn as grains of ash; a click or its button blows it away with glowing edges and it gathers back (canvas 2D, server-safe text) | [Spec Sheet](https://frictionborn.com/r/ash-text.md) | | [distortion-image](https://frictionborn.com/docs/components/distortion-image) | `media` | media: WebGL2 hover-displacement image overlay (webgl, client-only, reduced motion -> static image, mobile -> plain image / 0 contexts) | [Spec Sheet](https://frictionborn.com/r/distortion-image.md) | | [eclipse-switch](https://frictionborn.com/docs/components/eclipse-switch) | `control` | control: Light/dark theme switch: the moon slides across the sun until only the corona remains (canvas 2D, server-safe switch, reduced motion -> still) | [Spec Sheet](https://frictionborn.com/r/eclipse-switch.md) | | [ember-badge](https://frictionborn.com/docs/components/ember-badge) | `feedback` | feedback: Unread-count badge that is a live ember: flares on new items, cools to ash at zero (canvas 2D, server-safe, reduced motion -> static badge) | [Spec Sheet](https://frictionborn.com/r/ember-badge.md) | | [ember-core](https://frictionborn.com/docs/components/ember-core) | `background` | background: 3D ash filament sphere with inner ember glow, vortex stir, shockwave strike and hold-to-charge burst (WebGL2, still under reduced motion) | [Spec Sheet](https://frictionborn.com/r/ember-core.md) | | [firework-rating](https://frictionborn.com/docs/components/firework-rating) | `control` | control: Five-star rating as a real radio group; hover previews, and each chosen star bursts as a firework (canvas 2D, server-safe, reduced motion -> plain) | [Spec Sheet](https://frictionborn.com/r/firework-rating.md) | | [flame-switch](https://frictionborn.com/docs/components/flame-switch) | `control` | control: On/off switch with a live pilot flame on its knob (canvas 2D, server-safe switch, reduced motion -> switch only, touch -> same switch) | [Spec Sheet](https://frictionborn.com/r/flame-switch.md) | | [flint-button](https://frictionborn.com/docs/components/flint-button) | `cta` | cta: Button that strikes like flint: a steel rakes the stone and throws sparks; heat builds until it catches (canvas 2D, native button, reduced motion -> plain) | [Spec Sheet](https://frictionborn.com/r/flint-button.md) | | [fuse-toast](https://frictionborn.com/docs/components/fuse-toast) | `feedback` | feedback: Undo toast whose time runs out as a fuse burning along its edge; it pauses while hovered or focused (canvas 2D, server-safe toast) | [Spec Sheet](https://frictionborn.com/r/fuse-toast.md) | | [hold-to-confirm](https://frictionborn.com/docs/components/hold-to-confirm) | `control` | control: Press-and-hold button for destructive actions: it fills, then crumbles to ash left to right; Undo rebuilds it (canvas 2D, native button) | [Spec Sheet](https://frictionborn.com/r/hold-to-confirm.md) | | [lantern-sky](https://frictionborn.com/docs/components/lantern-sky) | `background` | background: Night sky of paper lanterns rising at different depths; the pointer is a warm breeze (canvas 2D, server-safe, reduced motion -> still sky) | [Spec Sheet](https://frictionborn.com/r/lantern-sky.md) | | [light-leak-tabs](https://frictionborn.com/docs/components/light-leak-tabs) | `navigation` | navigation: ARIA tabs over a furnace slot: the selected tab lets the firelight through and the light slides as you switch (canvas 2D, server-safe tabs) | [Spec Sheet](https://frictionborn.com/r/light-leak-tabs.md) | | [magnetic-button](https://frictionborn.com/docs/components/magnetic-button) | `cta` | cta: Magnetic spring wrapper for buttons and links with fine-pointer gating (dom, server-safe, reduced motion -> static, mobile -> 0 listeners) | [Spec Sheet](https://frictionborn.com/r/magnetic-button.md) | | [marquee](https://frictionborn.com/docs/components/marquee) | `strip` | strip: Infinite marquee with inert duplicate, hover/focus pause, and pause button (dom, server-safe, reduced motion -> static, mobile -> animates) | [Spec Sheet](https://frictionborn.com/r/marquee.md) | | [match-progress](https://frictionborn.com/docs/components/match-progress) | `feedback` | feedback: Progress bar drawn as a row of matches, each catching from the last as the job advances (canvas 2D, server-safe bar, reduced motion -> still) | [Spec Sheet](https://frictionborn.com/r/match-progress.md) | | [mesh-gradient](https://frictionborn.com/docs/components/mesh-gradient) | `background` | background: multi-color organic mesh gradient via WebGL2 (webgl2, client-only, reduced motion -> static poster, DPR <= 1.5 on mobile/Tier 2) | [Spec Sheet](https://frictionborn.com/r/mesh-gradient.md) | | [noise-field](https://frictionborn.com/docs/components/noise-field) | `background` | background: WebGL2 domain-warped noise hero background (webgl2, client-only, reduced motion -> static poster, mobile -> tier 2 / tier 1 poster) | [Spec Sheet](https://frictionborn.com/r/noise-field.md) | | [particle-field](https://frictionborn.com/docs/components/particle-field) | `background` | background: WebGL2 vertex-shader particle drift with pointer repel (webgl2, client-only, reduced motion -> poster, mobile -> tier 2 / tier 1 poster) | [Spec Sheet](https://frictionborn.com/r/particle-field.md) | | [scroll-reveal](https://frictionborn.com/docs/components/scroll-reveal) | `media` | media: Scroll-driven entrance (CSS view() timeline, IntersectionObserver fallback) (dom, server-safe, reduced motion -> static, low-end mobile -> 12px) | [Spec Sheet](https://frictionborn.com/r/scroll-reveal.md) | | [scroll-showcase](https://frictionborn.com/docs/components/scroll-showcase) | `composition` | Scroll composition: StickyScrollStory + ScrollReveal + optional Marquee; all copy comes from props (DOM, reduced motion -> static/opacity, mobile -> stacked) | [Spec Sheet](https://frictionborn.com/r/scroll-showcase.md) | | [smooth-scroll](https://frictionborn.com/docs/components/smooth-scroll) | `page-provider` | page-provider: Lenis provider stepped strictly via useFrame with autoRaf false (dom, server-safe, singleton, reduced motion -> off, mobile -> off) | [Spec Sheet](https://frictionborn.com/r/smooth-scroll.md) | | [sticky-scroll-story](https://frictionborn.com/docs/components/sticky-scroll-story) | `scroll-section` | scroll-section: Sticky media column with scrolling steps (dom, server-safe, CLS <= 0.01, reduced motion -> opacity-only (instant swap), mobile -> stacked) | [Spec Sheet](https://frictionborn.com/r/sticky-scroll-story.md) | | [temper-slider](https://frictionborn.com/docs/components/temper-slider) | `control` | control: Native range input across polished steel; the knob shows the oxide colour that forms at that temperature (canvas 2D, server-safe input) | [Spec Sheet](https://frictionborn.com/r/temper-slider.md) | | [text-reveal](https://frictionborn.com/docs/components/text-reveal) | `headline` | headline: word/line/char text reveal (dom, server-safe, SSR text stays static, reduced motion -> static, low-end mobile -> 40 ms stagger) | [Spec Sheet](https://frictionborn.com/r/text-reveal.md) | ## Setup 1. Register the namespace once, in `components.json` (use the registry URL published with the release; the registry is not on a public host yet, so ask the owner if the file does not have it): ```json { "registries": { "@frictionborn": "/r/{name}.json" } } ``` 2. Install items. The shadcn CLI also installs the items they depend on, `@frictionborn/runtime` and (smooth-scroll) lenis; do not add them by hand: ```bash npx shadcn@4.21.1 add @frictionborn/ ``` 3. Next.js: render `` (from `@frictionborn/runtime`) in `` of the root layout, a Server Component. Vite / SPA: call `initMotionReady()` before `createRoot(...).render(...)`. Items whose sheet lists a "Client Reveal Gate" stay static without it. 4. Under a strict Content Security Policy see `docs/CSP.md`: pass `nonce`, and `MOTION_READY_SCRIPT_HASH` or a nonce for `MotionReadyScript`. ## Runtime Usage ```tsx import { MotionReadyScript, initMotionReady, useFrame, useReducedMotion } from "@frictionborn/runtime"; ```