As seen on the TailwindCSS website, create a horizontal grid of moving cards that loop infinitely. When hovered over, the cards slow down and are clickable.
Grid
of Cards
that takes in an array of details, provided in the codebase as cardDetails
.cardDetails
are over, loop over and start with the first card again.Name
, Image
, Link
and Content
hovered
over, the speed is slowed down by 10 units.href
page, as given in the cardDetails
array.degrees
.Click to reveal
Try using useRef
hook to mutate and transform your cards.
Click to reveal
The most common property to move an element is translate
. You can use transform: translate
in CSS to move an element from one position to another.
Click to reveal
Use onMouseEnter
and onMouseLeave
to trigger hover events. You can then set the Hover reference property to true or false, and slow down the speed accordingly.