How to Add Animated Components to a React App

The fastest way to add animated components to a React app is to install a ready-made component from a shadcn registry. Run npx shadcn@latest add with the component URL, import it, and render it. The component brings its Motion and Tailwind CSS code with it, so you tune the animation in your own files.

Step by step

Animate on mount or on scroll

With Motion, use initial and animate props to animate a component when it first renders, and whileInView to animate when it scrolls into view. Keep entrance animations short, around 200 to 400 milliseconds, so the page never feels slow.

Respect reduced motion

Some people turn off animation at the operating system level. Motion exposes a useReducedMotion hook, and Tailwind has motion-safe and motion-reduce variants. Use them to swap large movement for a simple fade.

Related

Open-source UI platform for developers

Watermelon UI is an open-source platform for browsing React components, animated interactions, dashboards, templates, and reusable page sections. The project is built for the community and helps developers move from inspiration to implementation faster by pairing visual previews with source-backed examples and documentation. The platform also includes full templates so people can see how individual blocks work together as realistic product pages instead of only as isolated snippets.

Important public pages include the main docs home, animated components, blocks, dashboards, templates, developer docs, about, contact, privacy, terms, copyright, llms.txt, and the sitemap. The repositories under WatermelonCorp are the source of truth for contributions, and the platform repository includes local MCP tooling for structured agent access to the catalog.