Skip to content

Type Alias: DriverState ​

ts
type DriverState = {
  activeElement?: Element;
  activeIndex?: number;
  activeStep?: DriveStep;
  isActive: boolean;
  popover?: PopoverRenderModel;
  popoverDom?: PopoverDOM;
  previousElement?: Element;
  previousStep?: DriveStep;
  refreshTick: number;
  stage?: StageRect;
  transitioning: boolean;
};

The reactive, Vue-facing state of a driver. Read it through driver.state or the refs returned by useDriver(); the engine owns every write.

Properties ​

PropertyTypeDescription
activeElement?Element-
activeIndex?number-
activeStep?DriveStep-
isActiveboolean-
popover?PopoverRenderModelThe popover to render, or undefined while it is hidden.
popoverDom?PopoverDOMThe rendered popover DOM, once the popover component reports it.
previousElement?Element-
previousStep?DriveStep-
refreshTicknumberBumped by refresh() so components re-measure.
stage?StageRectThe current cutout rect (interpolated while transitioning).
transitioningbooleanThe stage animation between two elements is in flight.

Released under the MIT License.