react-spring-dnd

    0.2.0 • Public • Published

    react-spring-dnd 🕊

    A deadly simple drag and drop solution using react-spring

    npm npm npm bundle size npm peer dependency version GitHub


    Play with this example!

    Add

    yarn add react-spring-dnd
    
    # or
    
    npm i react-spring-dnd

    Use

    import SpringList from 'react-spring-dnd';
    
    const App = () => (
      <SpringList>
        {'hello react spring dnd 👋⚛️🌀🦥'.split(' ').map((item) => (
          <div key={item}>{item}</div>
        ))}
      </SpringList>
    );

    Try

    Live demo →

    API

    Prop Type Default Description
    row boolean false If show as row
    onDragEnd function - onDragEnd callback, (order) => void
    children array [] Draggable items

    License

    MIT License © nanxiaobei

    Install

    npm i react-spring-dnd

    DownloadsWeekly Downloads

    422

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    17.1 kB

    Total Files

    9

    Last publish

    Collaborators

    • nanxiaobei