RE

React Sortable Hoc

react-sortable-hoc

Set of higher-order components to turn any list into a sortable, touch-friendly, animated list

Animation
react
reactjs
react-component
sortable
sortable-list
list
sortable list
smooth
animated
hoc
Stars
11k
Weekly
647k
Open issues
289
Bundle
~25 kB

Installation

npm install react-sortable-hoc

Code example

import { motion } from "react-sortable-hoc";

export function Example() {
  return (
    <motion.div
      initial={{ opacity: 0, y: 12 }}
      animate={{ opacity: 1, y: 0 }}
      transition={{ duration: 0.35 }}
    >
      <h2>Animated with React Sortable Hoc</h2>
    </motion.div>
  );
}

Pros & cons

Pros

  • Actively maintained by Clauderic Demers
  • 647k weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 289 open issues on GitHub

FAQs

Alternatives & similar libraries