Skip to contentWolf-Rayet

Spotlight

A spotlight draws attention to one part of the interface to teach users about a key feature or workflow.

Install

One package and one stylesheet. The stylesheet holds the tokens every component uses.

pnpm add @wolf-rayet/react
import '@wolf-rayet/react/css/wolf-rayet.css';
import { Spotlight } from '@wolf-rayet/react';

Props

A required prop is marked with an asterisk.

PropTypeDefaultDescription
headingstringNoneWhat this step is about, in a few words.
children *ReactNodeNoneOne or two sentences. A spotlight interrupts, so it should be brief.
actionsReactNodeNoneForward and back, or a single dismissal at the end.
footerstringNoneThe position in a sequence, as in 1 of 3, so people know how long this will take.

Accessibility

What the component does for you, and what it needs from you.

  • A spotlight takes focus when it opens and returns it when it closes, so keyboard users stay in the right place.
  • It can be dismissed from the keyboard, so keyboard users are never trapped.
  • The sequence position is text, so it is announced rather than only seen.