NextStep - Lightweight Next.js Onboarding Library Logo

Animations for Remix

NextStepjs uses Motion (aka Framer Motion) to provide smooth, customizable animations for your onboarding tours. This guide explains how to customize animations in your Remix application.

Default Animations

By default, NextStepjs uses a smooth animation for transitioning between tour steps. The default animation settings are:

// Default animation settings
cardTransition = {ease: 'anticipate', duration: 0.6};

These settings create a natural, fluid transition between steps that feels responsive and engaging.

Customizing Animations

You can customize the animation behavior by providing your own transition settings to the cardTransition prop of the NextStepReact component:

import { NextStepReact, NextStepProvider } from 'nextstepjs';

function MyApp({ Component, pageProps }) {
  return (
    <NextStepProvider>
      <NextStepReact
        steps={steps}
        cardTransition={{ 
          ease: 'easeOut', 
          duration: 0.4,
          stiffness: 100,
          damping: 10
        }}
      >
        <Component {...pageProps} />
      </NextStepReact>
    </NextStepProvider>
  );
}

Animation Properties

The cardTransition prop is passed directly to the motion.div transition prop from Motion, giving you access to all of Motion's animation capabilities. See Motion docs for more info.

Animation Examples

Here are some examples of different animation configurations you can use:

Smooth Fade

cardTransition={{ 
  ease: 'easeInOut', 
  duration: 0.5 
}}

Bouncy Spring

cardTransition={{ 
  type: 'spring',
  stiffness: 300,
  damping: 20
}}

Quick Snap

cardTransition={{ 
  ease: 'backOut', 
  duration: 0.3 
}}

Delayed Appearance

cardTransition={{ 
  ease: 'easeOut', 
  duration: 0.4,
  delay: 0.2
}}

Disabling Animations

If you prefer not to have animations, you can effectively disable them by setting a very short duration:

cardTransition={{ 
  duration: 0.01 
}}