Image Trail

Moving the mouse leaves a fading trail of images.

Move your mouse here.

import { ImageTrail } from '@brand-studio/ui';
import { beans, cup, pour } from '@/demos/assets';

export default function ImageTrailDemo() {
  return (
    <ImageTrail images={[cup, beans, pour]} className="demo-trail">
      <p style={{ margin: 0, fontSize: 'clamp(28px, 5vw, 56px)', fontWeight: 600, textAlign: 'center' }}>Move your mouse here.</p>
    </ImageTrail>
  );
}

Installation

pnpm add @brand-studio/ui

Usage

import { ImageTrail } from '@brand-studio/ui';
<ImageTrail images={images}>
  <h2>Move your mouse here.</h2>
</ImageTrail>

Accessibility

  • Decorative only: trail images have empty alt text.
  • Touch and reduced motion show only the content.

API Reference

PropTypeDefault
imagesImageAsset[]
children?React.ReactNode
spacing?number90
className?string''

Still, Deskhand and Hollis are fictional brands. The coffee photographs are original generated artwork. @brand-studio/ui is MIT licensed.