Components/Physics motion

Physics motion

61 independently retained folding, stroke, stacking and mechanical motion scenes.

Since 0.6.3BETA

This component doc is in progress

This page is still being migrated. Demos and API details may change.

Overview

TxPhysicsMotion preserves every named non-loader whimsical implementation as its own scene. Paper folds use actual hinged layers and clipping; stroke scenes retain their original SVG coordinates; mechanical scenes retain their own pivot, motion vector, scale sequence and phase offsets. TxMotionDock owns the separate caller-driven dock. The CSS loaders and UI-kit controls are documented under their own components.

Artwork has an explicit assembled pose. Pausing, disabling, leaving the viewport, hiding the document, KeepAlive deactivation or reduced motion cancels native animations and timers, revealing that readable pose. Decorative playback does not announce or simulate business completion.

Usage

Complete catalogue

The demo renders all 61 named scenes, filters by original ID or symbol, and provides a keyboard-operable trigger on every specimen. The selected scene additionally exposes trigger, loop, speed, content and replay controls.

Loading demo...

Playback and triggers

auto starts when the artwork becomes visible. hover supplies pointer-entry and focus replay; click supplies native button activation, including Enter and Space. manual starts only through replay() or a changed replayKey. A replay interrupts and replaces the previous choreography without forcing a reflow.

loop=true retains the upstream automatic repeating preview, including for hover/click scenes. Use loop=false for a strictly input-triggered one-shot. Each scene restarts at its original useLoopFlg cadence; tracks with a distinct duration keep that duration, such as the one-second metronome or four-second gear tracks. A one-shot completes its longest track and then shows the assembled pose.

API Reference

Props

PropTypeDefaultDescription
variantPhysicsMotionVariant'anim-card-peel'Exact ID from the source mapping below.
trigger'auto' | 'hover' | 'click' | 'manual''auto'Automatic visibility playback, input replay or API-only playback.
loopbooleantrueRetain the scene's own restart cadence and internal track durations.
pausedbooleanfalseCancel playback and reveal the assembled pose. A queued replay can start on resume.
disabledbooleanfalseStop animation and disable the native interactive stage.
replayKeystring | number—Changing the key requests another run without remounting.
speednumber1Playback multiplier, clamped to 0.1–5; non-finite values use 1.
size'xs' | 'sm' | 'md' | 'lg''md'96, 128, 160 or 192px stage, with proportionally scaled geometry.
ariaLabelstringSource symbol or labels.replayAccessible name; hover/click stages are native buttons, others are images.
labelsPartial<PhysicsMotionLabels>See belowLocalized action and artwork content.

Labels

KeyDefaultMeaning
replay'Replay animation'Default accessible name of interactive stages.
content'Open'Actual revealed text in the gate and sliding shutter.
north'N'North dipole block label.
south'S'South dipole block label.

Events

EventPayloadDescription
playPhysicsMotionVariantAn actual native playback or source-loop restart starts.
finishPhysicsMotionVariantThe longest one-shot track finishes; the assembled pose is visible. Looping or cancellation does not emit this event.
coveredPhysicsMotionVariantTsumiki's actual 1400ms source milestone, adjusted by speed. It is not a save, navigation or network result.

Slots and methods

EntryContract
default slotOptional caption outside the interactive stage, associated through a stable Vue ID.
replay()Replace the current run. If inactive, retain the request until active; reduced motion keeps the assembled pose.
reset()Cancel all tracks and queued replay, revealing the assembled pose.
playingExposed boolean indicating that real native tracks are currently owned by this instance.

Exports

TxPhysicsMotion, installable PhysicsMotion, TxPhysicsMotionInstance, PhysicsMotionProps, PhysicsMotionEmits, PhysicsMotionLabels, PhysicsMotionTrigger, PhysicsMotionVariant and PhysicsMotionSource are exported from @talex-touch/tuffex/physics-motion.

PHYSICS_MOTION_VARIANTS is the complete readonly ID tuple. PHYSICS_MOTION_SOURCES contains one real mapping per variant with variant, symbol, file, period and behavior. PHYSICS_MOTION_DEFAULT_LABELS supplies the defaults above.

CSS variables

VariableMeaning
--tx-physics-accentOptional scene accent; otherwise uses --tx-color-primary. Related tones mix that accent with the host's surface and ink tokens.
--tx-physics-size / --tx-physics-scaleStage length and dimensionless artwork scale, driven together by size.

All paper, line, background and text colors use the host's --tx-* tokens. Hover color changes are immediate.

Source mapping

The table lists the source scene restart cadence, not a replacement universal animation duration. Every link is pinned to upstream commit 43c29ce9cdd16459e3eab4992381b8d35b38776a.

VariantOriginal symbolRestart cadenceIndependent structure and trajectoryPinned implementation
anim-card-peelCardStackPeel3000 msA top card peels down 24px with a 25° perspective tilt, revealing the underlay.Source
anim-bookmark-cornerBookmarkCornerPeel3000 msThe upper-right dog-ear clips away and its folded corner slides into view.Source
anim-elastic-tagElasticTagSnap3000 msA luggage tag stretches down, then recoils above its anchor and settles.Source
bookmark-stamp-dropBookmarkStampDrop3000 msA hanging ribbon badge drops from above and damps its alternating angular swing.Source
anim-split-gateSplitGateReveal3000 msTwo vertically opposed gate panels uncover caller-provided content.Source
anim-shutter-slideShutterSlide3000 msLeft and right half-width shutters slide horizontally by 95% of their own width.Source
diagonal-drapeDiagonalDrape3000 msA diagonally clipped cloth exposes the accent field under a fixed pull pin.Source
anim-origami-envelopeOrigamiEnvelopeUnfold3000 msThe triangular envelope flap turns through 180° around its top hinge.Source
anim-card-dispenserSmartCardDispenser3000 msAn identity card ejects 38px upward from behind the dispenser slot.Source
anim-sticky-noteStickyNotePeel3000 msThe top memo peels up from its bound edge, lifting and disappearing at 90°.Source
anim-receipt-tapeReceiptTapePrint3000 msA receipt feeds downward in four discrete print steps, then retracts.Source
anim-roller-blindRollerBlindDrop3000 msA single roller shade grows down from its fixed header, then rolls back up.Source
anim-scroll-canvasScrollCanvasUnroll3000 msThe scroll opens symmetrically while its left and right rollers move apart.Source
flag-pennant-unfurlFlagPennantUnfurl3000 msA triangular pennant unfurls horizontally from its stationary pole.Source
anim-ribbon-bannerRibbonBannerSlide3000 msA pill-shaped banner stretches outward from its centre, retaining two internal marks.Source
anim-page-turnPageTurnCurl3000 msA sheet rises 60px, uncurls its lower corners and flattens its 45° tilt.Source
area1Area12200 msA suspended fabric panel overshoots its open and closed heights between two rollers.Source
tissueTissue3000 msOne tissue is pulled out; the following tissue pushes up from the box slot.Source
curtainCurtain3200 msA centre zipper rises as mirrored cloth corners curve away; the pull tab swings during travel.Source
anim-tension-capsuleKineticTensionCapsule2800 msThe rubber capsule stretches horizontally, compresses vertically and recoils; its internal nodes separate with the tension.Source
area6Area61400 msAn unadorned pill widens, undershoots its resting width and recoils through a second overshoot.Source
anim-droplet-squishDropletSquish2400 msA liquid capsule alternates flattened and tall impact silhouettes with asymmetric rounded ends.Source
anim-segmented-linkSegmentedLinkStretch2400 msThree distinct pill joints move apart by 14px at each outer joint, then snap together.Source
anim-blind-pullBlindPull2800 msFive accordion slats separate vertically while the tension cord and pull knob descend.Source
anim-rotating-louversRotatingLouvers3000 msFour independent architectural slats turn through 75° in delayed sequence.Source
anim-iris-shutterGeometricIrisShutter3000 msA square camera aperture rotates 60° while expanding around its circular centre.Source
radial-apertureRadialAperture3000 msA rounded square diaphragm rotates 90° inside its circular aperture housing.Source
anim-bubble-levelPendulumBubbleLevel3000 msThe fluid bubble crosses its centre target, overshoots in both directions, then damps.Source
anim-kinetic-metronomeKineticTickingMetronome2000 msA weighted metronome arm ticks ±35° around its bottom pivot.Source
newtons-cradleNewtonsCradle2400 msThe left and right end balls swing on alternate halves of the transfer cycle.Source
anim-orbital-gimbalNestedOrbitalGimbal3000 msFour-second clockwise square and two-second counter-rotating circle tracks; both reset at the source three-second cadence.Source
gyroscope-ringsGyroscopeRings3000 msA ring rotates through a full X turn and half Y turn in perspective around a fixed core.Source
anim-slinky-coilSlinkyCoil2400 msFive horizontal coils extend upward from their bottom anchor and compress together.Source
anim-squash-sphereSquashStretchSphere2200 msA falling rubber sphere squashes on impact, stretches on rebound and returns to its launch height.Source
anim-gelatin-wobbleGelatinWobble2200 msA square gelatin cube lands with six diminishing vertical and aspect-ratio oscillations.Source
anim-domino-chainDominoChain3000 msFive upright tiles tip 72° sequentially around their lower-right corners, then reset.Source
anim-card-cascadeCardDeckCascade3000 msThree cards fan radially by ±22° and ±24px around a lower pivot.Source
fan-foldFanFold2800 msFive slender origami fan blades spread to ±40° about a common rivet.Source
anim-gear-stepGearToothStep3000 msTwo synchronized opposite four-second toothed-ring tracks, with the source three-second restart.Source
anim-magnetic-disksMagneticDisks2400 msTwo disks stretch toward one another, squash at contact and separate after magnetic recoil.Source
anim-dual-magnetDualMagnetDipole2400 msNorth and south blocks close their 28px gap to 4px as the dipole cluster swells.Source
anim-compass-deflectCompassNeedleDeflect2600 msA two-tone compass needle deflects 65°, overshoots −45° and damps to north.Source
balance-scaleBalanceScale3200 msLeft and right weights arrive at different times and drive a damped balance-beam tilt.Source
anim-sudden-brakeSuddenBrake2800 msA vehicle decelerates from the right, then tips backward and settles around its left wheel.Source
anim-rolling-tumbleRollingTumble2600 msA cube moves through quarter turns on a 2200ms track, reset at the source 2600ms cadence.Source
anim-inertia-skidInertiaSkidStop2800 msA sliding block overshoots its landing position while its skew reverses under friction.Source
anim-circuit-traceCircuitTraceDraw3000 msAn angular PCB trace draws and erases between two fixed terminal nodes.Source
anim-hex-latticeHexagonLatticeDraw3000 msA six-sided wireframe assembles by stroke drawing and then wipes around its perimeter.Source
anim-stroke-waveformStrokeWaveform3000 msThe source cardiac waveform draws left to right and progressively erases.Source
stroke-spiralStrokeSpiral3000 msA circular signature draws while rotating through 180°, then clears during the second half turn.Source
kakikakiKakikaki3000 msThe original seven-point calligraphic zigzag draws across its full stroke and then clears.Source
anim-neon-signNeonSignDraw2800 msA distinct neon pulse polyline draws in 240ms, holds, then clears over the final 1200ms.Source
anim-prism-stackPrismBlockStack3000 msThree descending prisms stack from wide foundation to narrow top with delayed weighted landings.Source
anim-modular-tileModularTileSnap3000 msTwo rotating modules snap into place, one with a circular inset and one with a square inset.Source
anim-pyramid-buildPyramidBlockBuild3000 msA three-two-one pyramid builds base to peak through staggered row-scale pops.Source
tetris-block-settleTetrisBlockSettle3000 msAn actual L-shaped three-square block settles above a fixed three-block foundation.Source
anim-shutter-blocksShutterStepBlocks2800 msFour horizontal slices open left to right with an 80ms per-tier phase delay.Source
magnetic-orbit-particleMagneticOrbitParticle3000 msA satellite follows its 2600ms orbit around a fixed core, with the source 3000ms restart.Source
magnetic-grid-repelMagneticGridRepel2600 msFour magnetic grid points disperse along independent diagonal vectors and return.Source
tsumikiTsumiki3000 msFive bars drop from alternating rotations, cover the stack at 1400ms, then cascade downward in reverse order.Source
bookmarkBookmark3600 msLayered notched ribbons lift and descend in perspective while circular washes and four signature sparkles appear in sequence.Source

Best Practices

  • Choose geometry that communicates the interaction. A paper reveal, a mechanical pivot and a path drawing retain different carriers; changing variant changes actual structure.
  • Supply localized labels and a contextual ariaLabel. Keep any business content in the caption or the caller's own UI.
  • Use loop=false for deliberate interaction feedback. Reserve automatic looping for an explicitly requested decorative preview.
  • Drive business state from real data. finish and covered are visual milestones only.
  • Let the component own visibility and reduced-motion suspension. No caller timer is needed to replay the source rhythm.
  • Import PHYSICS_MOTION_SOURCES for an accurate catalogue rather than maintaining a second ID list.

Technologies

The port uses native HTML/SVG and Web Animations, with source-specific keyframes, clipping and nested pivots. Spring-shaped legs use the existing liquid resolveTransition compiler; there is no second integrator. Width/height reveals keep their glyphs unstretched through clipping and translated edges. The shared useMotionActivity gates all animation and source-cycle timers. No SVG definitions or global counters are required; caption identifiers use Vue useId.

Adapted under MIT. Copyright (c) 2026 SYED SUBHAN UDDIN. This page records implementation contracts; it does not claim a completed browser or package verification run.