this pen uses animate-css-grid

If you use React, you might want to try out react-flip-toolkit

click a card to toggle the grid-column and grid-row properties on the card