0.2.0

The tour overlay renders a full-screen SVG backdrop with a cutout around the target element. It draws attention to the active step and dims the rest of the page. Pass false to disable.

Config

PropertyTypeDefaultDescription
paddingnumber8Pixels the cutout extends beyond the target
borderRadiusnumber8Corner radius of the cutout in pixels
isAnimatedbooleantrueWhether the spotlight animates between steps
hasCloseOnBackdropClickbooleantrueClose the tour when clicking outside the target
ariaPartial<ComponentAriaProps>ARIA attributes
customClassesPartial<BordaTourOverlayComponentClasses>Custom CSS classes
customStylesPartial<BordaTourOverlayComponentStyles>Custom inline styles
await borda.mount({
  steps: [
    {
      target: '#sidebar',
      title: 'Navigation',
      description: 'Browse sections here.',
      placement: 'middle-end',
    },
  ],
  tourOverlay: {
    padding: 12,
    borderRadius: 12,
    isAnimated: true,
    hasCloseOnBackdropClick: true,
  },
});

Disabling

await borda.mount({
  steps: [...],
  tourOverlay: false,
});

Customization

tourOverlay: {
  customClasses: {
    root: 'my-overlay',
    backdrop: 'opacity-50',
  },
  customStyles: {
    backdrop: {
      fill: 'rgba(0, 0, 0, 0.7)',
    },
  },
}

Interface

interface BordaTourOverlayProps {
  padding: number;
  borderRadius: number;
  isAnimated: boolean;
  hasCloseOnBackdropClick: boolean;
  aria: Partial<ComponentAriaProps>;
  customClasses: Partial<BordaTourOverlayComponentClasses>;
  customStyles: Partial<BordaTourOverlayComponentStyles>;
}