Skip to content

The onAfter Event

The onAfter event is triggered after the step is shown. This event is useful when you want to do something after the step is shown.

vue
<script setup>
  const steps = [{
    target: '[data-step=0]',
    content: 'Text Content',
    onAfter: () => { 
      // Do something after the step is shown
    }
  }];
</script>

INFO

The onAfter event is using await, so you can use a promise to delay the step.

vue
<script setup>
  const steps = [{
    target: '[data-step=0]',
    content: 'Text Content',
    onAfter: new Promise((resolve) => { 
      setTimeout(() => {
        // Do something after the step is shown
        resolve();
      }, 1000);
    })
  }];
</script>

Released under the MIT License.