Report a problem or share feedback← Catalog
Clerk: User Button
freemotion/clerk-user-button
A custom Clerk user button built with Motion. The closed avatar expands into an account menu, using Motion's resize() util to animate the container to the menu's measured height.
$
pnpm add motion # then adapt the free source from https://motion.dev/examples/react-clerk-user-buttonnpm deps: motion

- Source
- Motion (motion.dev)
- Kind
- transition
- Categories
- transition, button, navigation
- Use as
- recipe — technique you apply to your own markup
- Applies to
- buttonnavigation
- Motion
- on state · medium · motion · medium cost
- Tags
- motion, AnimatePresence, animate, layoutId
- Licence
- motion / motion/react / motion-v are MIT. Motion+ (premium components, example source, AI Kit pro tools) is paid — one-time Personal licence or per-seat Business.
- Live demo
- motion.dev
- Docs
- motion.dev
Similar
Compare all 4 →- Plus to menu morphtransitions/plus-menu-morphA small circular trigger (a "+" FAB, a compose button, an add-action affordance) that **morphs into the menu / panel it opens** instead of popping a separate surface next to it. The button's box grows in width / height and relaxes its corner radius into a rounded panel while the plus icon cross-fades + rotates out and the menu content slides in.
- Shared layout animationmotion/shared-layout-animationShared-element layoutId: a tab underline / pill that glides between items. The free, hand-rolled way to animate tabs, nav highlights and segmented controls — about 10 lines with `layoutId`. Free example (motion is MIT); copy and adapt the source from the example page.
- Menu dropdowntransitions/menu-dropdownDropdown origin-aware scale/fade.