Glin UI
Signature / Molecule

Spotlight

Full-page spotlight overlay for onboarding and feature highlighting.

Installation$

Install from
pnpm dlx @glinui/cli@latest add spotlight

Prefer the package?

Usage$

Spotlight is a "use client" component. It renders a full-viewport overlay with a transparent circular cutout at the specified position, great for onboarding tours and feature highlighting.

Examples$

With Pulse$

The pulse variant adds a pulsing ring around the spotlight cutout.

"use client"
import { Spotlight } from "@glinui/ui"
export function SpotlightPulseDemo() {
return (
<Spotlight
active
x="50%"
y="50%"
size={100}
pulse
onDismiss={() => {}}
/>
)
}

Accessibility$

  • When onDismiss is provided, the overlay becomes a focusable button with aria-label="Dismiss spotlight".
  • Supports keyboard dismissal via Enter and Space keys.
  • Without onDismiss, the overlay is a passive visual element.

Reduced Motion$

The pulse ring animation is paused via motion-reduce:[animation:none].

API Reference$

PropTypeRequiredDefaultDescription
activebooleanNotrueWhether the spotlight is active
onDismiss() => voidNo-Click overlay to dismiss
overlayColorstringNo"rgba(0, 0, 0, 0.7)"Overlay color
pulsebooleanNofalsePulsing animation
sizenumberNo150Spotlight radius in px
xnumber | stringNo"50%"X position of spotlight center (px or %)
ynumber | stringNo"50%"Y position of spotlight center (px or %)

Source$

import { Spotlight } from "@glinui/ui"
packages/ui/src/components/spotlight.tsx

Generated API Snapshot

Beta

Auto-extracted from TypeScript source in packages/ui/src/components/spotlight.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.

Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata

Primary Props Type

SpotlightProps

SpotlightProps

PropTypeRequiredDefaultDescription
activebooleanNotrueWhether the spotlight is active
onDismiss() => voidNo-Click overlay to dismiss
overlayColorstringNo"rgba(0, 0, 0, 0.7)"Overlay color
pulsebooleanNofalsePulsing animation
sizenumberNo150Spotlight radius in px
xnumber | stringNo"50%"X position of spotlight center (px or %)
ynumber | stringNo"50%"Y position of spotlight center (px or %)