Image Transition

A slideshow where each image dissolves into the next through drifting noise.

Roasted coffee beans on the steel counter, with the same cobalt cup behind them.

1 / 3

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

export default function ImageTransitionDemo() {
  return (
    <div style={{ width: '100%', maxWidth: 720 }}>
      <ImageTransition label="The morning ritual" images={[beans, pour, cup]} />
    </div>
  );
}

Installation

pnpm add @brand-studio/ui

Usage

import { ImageTransition } from '@brand-studio/ui';
<ImageTransition label="The morning ritual" images={[beans, pour, cup]} />

The images keep their focal points through the dissolve. Serve them from the same origin, or with CORS headers, for WebGL to read them.

Accessibility

  • It is a labelled carousel. Previous and next buttons, the arrow keys and a sideways swipe change the image, and the count is announced.
  • Each slide is a real picture with its alt text; hidden slides are hidden from screen readers.
  • Without WebGL, and under reduced motion, images swap at once.

API Reference

PropTypeDefault
imagesImageAsset[]–
label?string'Gallery'
className?string''

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