Measured entry

motion-primitives-border-trail

hover-effectgradient-glowmotion on file

A client-side React overlay that sends a colored block around the border of a positioned container. It ships as a shadcn registry TypeScript component and uses Motion for the path animation, Tailwind utility classes, CSS masking and offset-path, plus a cn helper backed by clsx and tailwind-merge.

Specimen
Motion capture of the mounted demo, recorded by the harness. No audio track.
Harness screenshot of motion-primitives-border-trail at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of motion-primitives-border-trail at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of motion-primitives-border-trail 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-border-trail
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal70.0 KB (135.5 KB build, 65.5 KB baseline)
Bare modeOK
Provider requiredNO
Demo usedwritten from the component source API

Verdict

A focused, reliable accent that built and mounted cleanly across the tested layouts without accessibility findings or overflow. The animation dependency is a meaningful cost for one decorative effect, and reduced-motion behavior is left to the adopter.

Use it if

  • You want a looping edge highlight for cards, status panels, or active jobs.
  • Your interface already uses Motion and Tailwind, so the component fits the existing stack.
  • You need a decorative overlay that does not intercept pointer input or add accessible content.

Skip it if

  • You only need a static border and do not want to ship an animation dependency for decoration.
  • Your browser support policy excludes CSS masking or offset-path behavior.
  • Continuous ambient motion would conflict with your product's reduced-motion policy unless you add that handling.

Install

Installation record for motion-primitives-border-trail
Declared dependenciesmotion, clsx, tailwind-merge
Missing on installnone
Bare installbuilds and mounts without the shadcn-style helpers
Providerno provider required in the harness

In a non-shadcn project, add Motion, clsx, and tailwind-merge, provide the cn class-merging helper, and ensure Tailwind processes the component classes. The host element must establish positioning, and clipping is recommended when the trail should stay within rounded edges. Add reduced-motion handling if your application requires it.

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.