Back to Popmotion

PoseGroup: Reordering items

packages/popmotion-pose/docs/examples/react/posegroup-reordering.md

8.7.1344 B
Original Source

PoseGroup: Reordering items

When posed items in a PoseGroup component are reordered, they're automatically animated to their new position:

javascript
const Item = posed.li();

export default ({ items }) => (
  <PoseGroup>
    {items.map(({ id }) => <Item key={id} />)}
  </PoseGroup>
)
<CodeSandbox height="500" id="82k2rxv3kl" />