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.

Specimen
Motion capture of the mounted demo, recorded by the harness. No audio track.
Harness screenshot of motion-primitives-toolbar-expandable at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of motion-primitives-toolbar-expandable at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of motion-primitives-toolbar-expandable at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

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.

Harness measurements recorded for motion-primitives-toolbar-expandable
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal71.0 KB (136.4 KB build, 65.4 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten 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

Installation record for motion-primitives-toolbar-expandable
Declared dependenciesmotion, react-use-measure
Missing on installnone
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno 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.

Alternatives

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.