Skip to content
Site volume
Colourway

Components

Motion toggle

Pauses the page's ambient motion and plays it again. Loops only run while one is on the page.

Import from@maxgrits/overprint-react/motion
On this page

The motion toggle holds the page's ambient motion still: the ink field's loops and the blocks' idle moves. Entrances and moments a visitor caused still play. It is always in VisitorControls, and a loop-bearing Art corner at Press and Rave prints one too.

Example#

Look of this example
Live render of examples/motion-toggle/basic.tsx

Usage#

Use the motion toggle wherever something loops: it holds the ambient motion still (the ink field, the blocks' idle moves) while entrances and moments a visitor causes still play. A loop may only run while a toggle is on the page (WCAG 2.2.2, D-E3).

  • Where. Always in VisitorControls, and in the corner of art that loops at Press and Rave (Art loops).
  • Reduced motion. When the system or the site asks for reduced motion, the toggle shows pressed; pressing it plays again.
  • copy can name what it pauses: "Pause the art".

Anatomy#

The parts of examples/motion-toggle/basic.tsx, numbered:
  1. KeyPause or play glyph, pressed while motion is held..mk-motion-toggle

Volume#

The key is identical at every volume. It shows in art corners from Press, where loops are allowed.

  • Quiet

    Docs, forms, legal and long reads. Flat inks, no art in motion.

  • Studio

    The site default. Art on its own plates, one display moment per view.

  • Press

    Hero moments, covers and campaigns. Halftone fields and the second ink.

  • Rave

    Launches, posters and the 404. Every ink, and the words still win.

Content#

  • "Pause motion" and "Play motion", or name the thing: "Pause the art".

Do and don't#

Do

A loop with its pause key.

Don't

A looping ink field with no way to stop it.

A loop nobody can stop.

Moving art that cannot be paused fails WCAG 2.2.2 and makes some readers feel ill. Every loop ships with its key.

Accessibility#

  • A real button with aria-pressed: pressed means motion is held. Its name says what a press does next, "Pause motion" or "Play motion", and its glyph follows.
  • The choice persists (localStorage mk-motion) and is set on <html data-mk-motion="pause"> before the first paint by PrefsScript.
  • While at least one toggle is mounted the ink field may loop at Press and Rave; with none it only bursts, so a loop always comes with a visible control (WCAG 2.2.2).
  • Enter and Space press it; focus shows the 2 px ring.

Props#

PropTypeDefaultDescription
sizeSizenone
copyPartial<MotionToggleCopy>none
classNamestringnone

Generated from MotionToggleProps in packages/overprint-react/src/motion/motion-toggle.tsx.

Tokens#

System tokens (5)

Scanned from its CSS at build and checked against its registry entry.

Changelog#

Arrived in 0.1.0.

0.1.024 October 2026

  • Minorreact./motion: the generated panel and title keyframes, the reveal contract and the reduced-motion block, motionPrepaintScript, MotionRuntime (readiness flags, soft navigations, the keydown finisher), the width axis, and MotionToggle. Read the whole entry