Free · MIT licence · Tailwind + Motion

Expandable Profile Card Free React component

A small profile card that expands into a full profile with shared-layout animation, so the photo and name fly into their new positions.

Original component by Watermelon UI · MIT licence

  • React
  • CSS
  • Card
  • Layout
  • Profile
Expandable Profile Card

Get the code

Install in one linenpx shadcn@latest add https://registry.watermelon.sh/r/expandable-profile-card.json

Installs from the Watermelon UI registry through the shadcn CLI. Needs Tailwind CSS and the motion package, which the command adds for you.

import ExpandableProfileCard from '../expandable-profile-card';

export default function ExpandableProfileCardDemo() {
  return (
    <div className="flex w-full max-w-sm items-center justify-center p-4">
      <ExpandableProfileCard />
    </div>
  );
}

How the expandable profile card works

A small profile card that expands into a full profile with shared-layout animation, so the photo and name fly into their new positions. The component is a single TypeScript file built with React, Tailwind CSS and Motion, so the animation runs on springs and shared layouts instead of hand-written keyframes.

It comes from Watermelon UI, an open-source component library released under the MIT licence. Install it with the shadcn command above, or copy the source from the code tab into your project.

Frequently asked questions

A React project with Tailwind CSS and the motion package. The shadcn command installs the component and its dependencies for you.

Want motion like this on your website?

We design and build custom websites with motion, 3D and SEO built in. Websites from $500.

More free components

Explore our work