Skip to content

Type Alias: TourScope ​

ts
type TourScope = {
  driver: Driver;
  element?: Element;
  hasNext: boolean;
  hasPrev: boolean;
  index: number;
  isFirst: boolean;
  isLast: boolean;
  step: DriveStep;
  total: number;
};

The tour context added by <DriverTour> to every slot.

Properties ​

PropertyTypeDescription
driverDriver-
element?ElementThe highlighted element; undefined for a centered, element-less step.
hasNextboolean-
hasPrevboolean-
indexnumberIndex of the active step, -1 for a bare highlight().
isFirstboolean-
isLastboolean-
stepDriveStepThe active (resolved) step.
totalnumberNumber of steps in the tour, 0 for a bare highlight().

Released under the MIT License.