Measured entry
motion-primitives-toolbar-expandable
hover-effectspatialmotion on file
A client-side React toolbar that opens one compact content panel at a time with spring-driven height and opacity transitions. It ships as a shadcn registry component plus a click-outside hook, and depends on Motion, react-use-measure, Lucide React, Tailwind utility styles, and the usual class-name helper alias.



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 | 71.0 KB (136.4 KB build, 65.4 KB baseline) |
| Bare mode | FAIL |
| Provider required | NO |
| Demo used | written from the component source API |
What the harness recorded
BARE BUILD
✗ Build failed in 26.52s error during build: [vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/toolbar-expandable.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'
Verdict
A polished fit for a compact utility dock when its layout and fixed item model match the product. It builds and behaves cleanly in the configured harness, but it needs a shadcn-style setup before it will build or mount in a bare React project.
Use it if
- You need a compact launcher whose detail panel appears only after an explicit button click.
- Your interface has a small, known set of tools with short custom panels.
- Your app already uses Tailwind and shadcn-style import aliases, so the copied source fits its conventions.
Skip it if
- You need a toolbar that stays in normal document flow, since this one is absolutely positioned near the bottom of its container.
- You need full tablist semantics, arrow-key navigation, or explicit relationships between each trigger and panel.
- You want to avoid adding an animation runtime and element-measurement dependency for a small menu.
- Your tool set is highly dynamic and you do not want to reshape the source's fixed item and content structure.
Install
| Declared dependencies | motion, react-use-measure |
|---|---|
| Missing on install | none |
| Bare install | fails once the shadcn-style helpers are removed, so it needs that setup |
| Provider | no provider required in the harness |
A non-shadcn project must add Motion, react-use-measure, Lucide React, and Tailwind CSS; provide the expected class-name merge utility alias; copy the included click-outside hook; and preserve the client-component boundary. The parent layout must also establish the positioning context for the bottom-anchored toolbar.
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 hover-effect pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- eldora-card-flip-hover3d
- Renders
- YES
- A11y
- 0
- Gzip
- 17.5KB
- Bare
- pass
- Prov
- NO
- uilayouts-btn-hover-left-flip3d
- Renders
- YES
- A11y
- 0
- Gzip
- 17.5KB
- Bare
- pass
- Prov
- NO
- uilayouts-btn-hover-down3d
- Renders
- YES
- A11y
- 0
- Gzip
- 17.6KB
- Bare
- pass
- Prov
- NO
- uilayouts-btn-hover-multiplegradient-glow
- Renders
- YES
- A11y
- 0
- Gzip
- 17.9KB
- Bare
- pass
- Prov
- NO
- magicui-cool-modespatial
- Renders
- YES
- A11y
- 0
- Gzip
- 21.8KB
- Bare
- pass
- Prov
- NO
- uilayouts-hovercard2gradient-glow
- Renders
- YES
- A11y
- 0
- Gzip
- 24.0KB
- Bare
- pass
- Prov
- NO