Measured entry
motion-primitives-morphing-popover
transition-effectspatialmotion on file
A source-copy React client component that turns a trigger into an animated dialog surface through shared layout transitions. It ships as composable root, trigger, and content primitives, with controlled or uncontrolled state, and depends on Motion, a click-outside hook, a class-name utility, and utility CSS styles.



Measured
Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.
| Build | OK |
|---|---|
| Mount | OK |
| Console errors | 0 |
| Uncaught page errors | 0 |
| Horizontal overflow | clean at 375, 768, 1440 |
| Axe critical | 0 |
| Axe serious | 0 |
| Axe moderate | 0 |
| Axe minor | 0 |
| Gzip marginal | 17.3 KB (82.7 KB build, 65.4 KB baseline) |
| Bare mode | OK |
| Provider required | NO |
| Demo used | written from the component source API |
Verdict
A convincing choice for contextual actions where spatial continuity matters. It builds and mounts cleanly on its own, but the dialog semantics outpace its focus behavior, so plan an accessibility pass before using it for critical workflows.
Use it if
- You want a compact action panel that visually grows out of its trigger.
- Your React interface already uses Motion and can absorb a source-owned primitive.
- You need either controlled state or a simple internally managed open state.
Skip it if
- You need production-ready focus trapping, initial focus, and focus restoration without extending the component.
- You want a portal-based overlay that escapes clipping and stacking contexts.
- You are minimizing animation dependencies for a small disclosure interaction.
Install
| Declared dependencies | motion |
|---|---|
| Missing on install | none |
| Bare install | builds and mounts without the shadcn-style helpers |
| Provider | no provider required in the harness |
Add Motion, copy the click-outside hook, provide the class-name merge utility at the expected alias, enable the client-component boundary, and ensure your utility CSS pipeline includes the supplied classes. Add focus management if the popover contains interactive controls.
Source and credit
This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.
Author repository
github.com/ibelick/motion-primitivesAlternatives
Other published entries for the transition-effect pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- motion-primitives-morphing-dialogspatial
- Renders
- YES
- A11y
- 0
- Gzip
- 17.2KB
- Bare
- pass
- Prov
- NO
- motion-primitives-animated-groupspatial
- Renders
- YES
- A11y
- 0
- Gzip
- 58.2KB
- Bare
- pass
- Prov
- NO
- ruixen-glass-shipment-flowliquid-glass
- Renders
- YES
- A11y
- 0
- Gzip
- 60.0KB
- Bare
- pass
- Prov
- NO
- magicui-animated-listunclassified
- Renders
- YES
- A11y
- 0
- Gzip
- 54.0KB
- Bare
- fail
- Prov
- NO
- magicui-blur-fadedark-futuristic
- Renders
- YES
- A11y
- 0
- Gzip
- 63.2KB
- Bare
- fail
- Prov
- NO
- motion-primitives-transition-panelspatial
- Renders
- YES
- A11y
- 0
- Gzip
- 67.8KB
- Bare
- fail
- Prov
- NO