npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@octanejs/motion

v0.1.37

Published

Framer Motion bindings for the octane renderer — reuses motion-dom's animation engine, swaps the React components for octane host components.

Readme

@octanejs/motion

Framer Motion for the octane UI framework.

Motion separates a framework-agnostic animation engine (animate) and gesture primitives (hover, press) from its React components (motion.div, AnimatePresence). This package reuses the engine + gestures verbatim and reimplements the components on octane.

// before
import { motion, AnimatePresence } from 'motion/react';
// after
import { motion, AnimatePresence } from '@octanejs/motion';

function Card() @{
  <motion.div
    className="card"
    initial={{ opacity: 0, y: 20 }}
    animate={{ opacity: 1, y: 0 }}
    transition={{ duration: 0.3 }}
    whileHover={{ scale: 1.05 }}
    whileTap={{ scale: 0.95 }}
  >
    {'hello'}
  </motion.div>
}

function List(props) @{
  <AnimatePresence>
    @if (props.show) {
      <motion.div exit={{ opacity: 0 }}>{'I fade out when removed'}</motion.div>
    }
  </AnimatePresence>
}

What's bound

  • motion.<tag>initial, animate, transition, whileHover, whileTap, whileFocus, whileInView (+ viewport), exit, drag (+ dragConstraints, onDrag*), layout, layoutId, variants, plus any DOM props (className, style, events, …) and style MotionValues spread/bound onto the element.
  • AnimatePresence — exit animations on removal.
  • MotionConfig — global transition / reducedMotion defaults via context.
  • useReducedMotion() — a live prefers-reduced-motion subscription; operating-system setting changes update mounted consumers.
  • LayoutGroup — namespaces layoutId values so independent shared-layout surfaces do not cross-animate.
  • LazyMotion + domAnimation / domMax + m — feature-gated hosts. The ./react-m entry exposes every HTML/SVG host as a named export.
  • variants — label resolution (animate="visible") + parent→child propagation + staggerChildren / delayChildren (number or stagger() function) / staggerDirection.
  • useMotionValue(), useScroll(), useAnimate() — MotionValues, scroll-linked values, and imperative scoped animation.
  • useTransform(), useSpring(), useMotionValueEvent() — MotionValue composition: derive a value (range-map / transformer / multi-input combiner), spring toward a value or source, and subscribe to a value's events.
  • Motion's framework-agnostic helpers (animate, stagger, value types, …), re-exported.

How it works

octane had no public way for a runtime-proxy component to render a host element wrapping children, nor to provide context from plain-TS — so this package added two runtime primitives: hostComponent and provideContext. motion.<tag> renders a real <tag> through hostComponent, captures the node, and drives:

  • Animations from layout effects calling motion's animate(); gestures via hover() / press() / inView(); MotionValues (from useMotionValue / useScroll) by subscribing in style and writing the element directly.
  • MotionConfig + variants through provideContext: a plain-TS component stamps context for its children (config defaults, active variant labels).
  • drag with pointer events (axis lock + dragConstraints).
  • Exit without any deferred-deletion machinery: octane fires cleanups before detaching the DOM, so a leaving element's unmount cleanup clones it (outside the range octane is about to remove), animates the exit on the clone, and removes it when it finishes.
  • layout / layoutId via FLIP: measure the box, and if it moved/resized — vs the previous commit (layout) or a same-id element that just unmounted (layoutId) — apply the inverse transform then animate it back to identity. The same cleanup-before-detach ordering lets a leaving layoutId element record its box for a same-commit replacement; unused boxes expire after that commit. layout="position" applies only translation, layout="size" only scaling, and layout animations use transition.layout when provided.

Not yet ported

The full layout projection tree — nested projection, child scale correction, and continuous shared-layout during drag (the layout/layoutId here are single-element FLIPs). Also drag momentum/elastic physics and useTransform's output-map form (useTransform(mv, [0, 100], { opacity: [0, 1] })).

Stagger specifics: when: 'beforeChildren' | 'afterChildren' parent/child sequencing is not implemented, and a child's stagger index is fixed at registration order (a keyed reorder does not re-stagger).

Status

Current scope, known divergences, and verification status are tracked in the generated bindings status table, sourced from this package's status.json.