Skip to content
risinghqPublic

About

Animation primitives for Solid 2, built on motion-dom.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

solid-motion

Animation for Solid 2, built on motion-dom, the core of Motion.

<motion.div
  initial={{ opacity: 0, y: 20 }}
  animate={{ opacity: 1, y: 0 }}
  transition={{ duration: 0.2 }}
/>

Install

npm install @risinghq/solid-motion

It needs Solid 2. Getting started has the Vite and TypeScript setup and a first animation.

Features

  • initial, animate and exit targets, with keyframes and "auto" sizes
  • Variants, with stagger and parent-child ordering
  • Hover, tap, focus, pan and in-view states, with callbacks
  • Drag with constraints, momentum and drag controls, and Reorder lists
  • Animation controls for starting an animation from an event handler
  • Exit animations with AnimatePresence, including popLayout
  • Layout and shared-layout animations, with LayoutGroup
  • Motion values, derived values, scroll-linked values and velocity
  • SVG geometry and path drawing
  • Reduced-motion support and a switch that turns all animation off
  • Server rendering: the first paint is in the HTML
  • animate() for elements you do not render yourself

Manual

The manual has one page per part of the API.

The documentation site renders the manual. Each example runs next to its motion/react equivalent and has controls for its values.

To work on the package, see contributing.

License

MIT

About

Animation primitives for Solid 2, built on motion-dom.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages