Display & Navigation · Spotlight Popoverstable
Spotlight Popover
An onboarding step that dims the page, rings one element and shows a card with the step count, skip and next buttons.
Preview
#previewSwitch placement and state. The dim layer is clipped to this frame; in an app it covers the page. Next cycles the three steps.
bottom · open · yes
spotlight-popover-example.tsx
import { SpotlightPopover } from "@blade-ai/weft/components/spotlight-popover";
export function SearchStep({ isOpen, step, onNext, onSkip }: Props) {
return (
<SpotlightPopover
isOpen={isOpen}
title="Search payments"
description="Find any payment by ID, customer or amount."
step={step}
totalSteps={3}
onNext={onNext}
onSkip={onSkip}
>
<Button variant="secondary">Search</Button>
</SpotlightPopover>
);
}All states
#all-statesThe four placements, the last step, and the form without skip, each clipped to its tile.
Bottom
Top
Right
Left
Last step · Done
No skip
Props
#propsSpotlightPopover wraps the element being introduced. The app owns which step is open.
Prop
Type
Default
Description
children
ReactNode
—
The element being introduced. It is lifted above the dim layer and ringed. Required.
isOpen
boolean
—
Shows the dim layer, ring and card. Required.
title
string
—
Step heading, also the card's accessible name. Required.
description
ReactNode
—
Step body text. Required.
icon
IconComponent
—
Optional icon before the title. Decorative.
placement
"bottom" | "top" | "right" | "left"
"bottom"
Which side of the target the card sits on.
step
number
—
1-based current step. With totalSteps it renders "2 of 4".
totalSteps
number
—
Total steps in the tour.
onNext
() => void
—
Fires from the primary button. On the last step label it "Done". Required.
onSkip
() => void
—
Fires from the skip button and on Esc. Omit to hide skip.
nextLabel
string
"Next"
Primary button text.
skipLabel
string
"Skip tour"
Skip button text.
width
number
300
Card width in px.
className
string
—
Extra classes on the card.
Usage
#usageShort rules for choosing and writing spotlight steps.
Do
Introduce one element per step and say what it does for the reader.
Show the step count so people know how long the tour is.
Keep tours to three to five steps.
Always offer Skip tour, and label the last button "Done".
Don't
Do not start a tour without being asked or on first load of a busy page.
Do not point at an element that is hidden or off-screen.
Do not put long copy or forms in the card.
Do not repeat a tour people already skipped.
Accessibility
#accessibilityA labelled dialog that takes focus when it opens. Esc skips the tour.
Keyboard
Key
Action
Tab
Moves focus between Skip tour and Next inside the card.
Enter / Space
Activates the focused button.
Esc
Skips the tour (when onSkip is set).
ARIA
Element
Role / attribute
When
Card
role="dialog" · aria-labelledby
Always while open. The title is the accessible name.
Card
tabindex="-1"
Focus moves to the card when it opens and on each step.
Ring and dim layer
aria-hidden
Always. Decorative.
Icon and arrow
aria-hidden
Always. Decorative.