0.2.0

The skip API manages the "Don't show again" flag. Access it through instance.skip.

Properties

PropertyTypeDescription
isSkippedbooleanWhether the skip flag is currently set
storageKeystringActive storage key (from config or default)

Methods

MethodDescription
set(value)Sets the skip flag and persists it. No-op when skip is disabled.
clear()Clears the persisted flag. Works even when skip is disabled.

Usage

// Check if user chose to skip
if (instance.skip.isSkipped) {
  console.log('User opted out of tours');
}

// Set manually
instance.skip.set(true);

// Clear (tour will replay next time)
instance.skip.clear();

// Read the storage key
console.log(instance.skip.storageKey); // e.g. "borda-skip"

Events

Skip state changes emit events:

import { BordaEvent } from '@retoo/borda';

instance.api.events.on(BordaEvent.ON_SKIP_CHANGE, () => {
  console.log('Skip toggled:', instance.skip.isSkipped);
});

instance.api.events.on(BordaEvent.ON_SKIP_CLEAR, () => {
  console.log('Skip cleared');
});