Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 3 min read

13 free React components with motion, and the small rules that made them feel right

We build websites for a living, and most of the motion we ship ends up locked inside client projects. So we pulled thirteen of our favourite patterns out, cleaned them up and put them online for free. They're called Repu

13 free React components with motion, and the small rules that made them feel right

We build websites for a living, and most of the motion we ship ends up locked inside client projects. So we pulled thirteen of our favourite patterns out, cleaned them up and put them online for free. They're called Republic UI, they're MIT licensed, and every one installs with a single shadcn command.

You can try them all at republicmarketing.co.uk/ui.

Slat Shutter Hero

What's in the set

  • Slat Shutter Hero. Scroll, and the cover photo splits into vertical slats that part from the centre outwards to reveal a second scene. The headline hands over line by line.
  • Photo Deck. A stack of prints you can drag, flick, or step through with the arrows and keyboard. Going back flies the last print in from the left instead of just swapping it.
  • Timeline Scrubber. Drag along a month ruler and the photos wipe in the direction you move, while the temperature rolls on digit reels.
  • Testimonial Reel. A quote, a portrait that slides up like a reel and a stat that rolls like an odometer.
  • Morph Island. A status pill that morphs from idle to uploading, done and a full preview.
  • Fan Gallery. Photo cards on an arc. Drag it, flick it, tap a side card or use the keys.
  • Plus a facts hero, feature rows with live UI, a bento of mini interfaces, a torn-paper portrait scroll, a scroll-fill headline, a sector wheel and a scattered-photo about section.

Fan Gallery

Install

Add the registry to your components.json:

"registries": {
  "@republic": "https://www.republicmarketing.co.uk/ui/r/{name}.json"
}

Then add whatever you need:

npx shadcn@latest add @republic/fan-gallery

Each component is one self-contained file. The only dependencies are motion, clsx, tailwind-merge and, for a few, lucide-react.

Five rules we kept coming back to

These came out of client feedback over the years, and they made more difference than any single effect.

1. Numbers roll, they never cross-fade. If a figure changes, it moves on digit reels, fast at first and slow to land. Two values fading over each other reads as a glitch.

2. One focal point at a time. When a new element takes over, the old one leaves properly. Dimmed leftovers peeking from the edge make a small space feel crowded.

3. One easing curve, used everywhere. Most of the set uses cubic-bezier(0.42, 0, 0, 1). Things that share a curve feel like they belong to the same product.

4. Every interaction has a keyboard path. The deck, the timeline and the fan all work with arrow keys, and the timeline also takes Home and End. Autoplay pauses on hover and only runs while the component is on screen.

5. Test the boring cases. Rapid clicks, dragging a few pixels and letting go, resizing the window mid-animation, scrolling back up. Most of our fixes came from these, not from the happy path.

Photo Deck

Real images, not grey boxes

Every demo uses original images made for the set, so the components look the way they will in a real build. The images are free to use with the components.

Links

If you use one in a project, I'd love to see it. And if you want a whole site built with this level of care, that's what we do at Republic Marketing, a web design agency in London and Birmingham.

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.