Skip to content

Dot Spotlight

A quiet dot grid with a soft light that follows the pointer and lifts the dots under it. Put it behind a hero, a sign-in or an empty state. Move the pointer over the preview to see it follow.

On this page

Examples

Density
Speed
Mask
Focus
Colour

Installation

npx knowns-ui@latest add dot-spotlight
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

children
ReactNode
Content drawn above the background. The root is relative and isolated; size it with className.
density
"low" | "medium" | "high" | number
Default"medium"
How much is drawn. A number is a multiplier from 0.25 to 3.
speed
number
Default1
Motion multiplier, up to 4. 0 holds a still frame.
color
string
Default"foreground"
A theme token ("primary", "muted-foreground", "ring", "chart-1"…), a CSS variable ("--brand") or any CSS colour.
mask
"radial" | "top" | "bottom" | "edges" | "none"
Default"radial"
Where it stays visible; it fades out elsewhere.
focus
"center" | "band" | "none"
Default"none"
A quiet zone behind your content: the pattern fades out there so body copy stays at AA contrast. Stacks with mask. The demos use "center".
intensity
number
Default1
Overall strength, 0 to 1.5.
paused
boolean
Defaultfalse
Stops the motion. It also stops offscreen, in hidden tabs and with prefers-reduced-motion (a still, composed frame).
className / style
-
On the root.
radius
number
Default260
Spotlight radius in px.
rest
{ x, y }
Default{ x: 50, y: 30 }
Where the light rests without a pointer, in % of the box.
Motion
-
CSS only. The pointer sets two CSS variables through an eased frame loop that stops when the light settles; speed sets the easing. Reduced motion: the light jumps.

When to use

When to use

  • A quiet hero or feature background with a soft light that follows the pointer.
  • Pages that should stay calm: it is CSS only and almost invisible until you move.

When not to use

  • Behind dense text or forms: any moving background lowers legibility there.
  • Touch-first pages: without a pointer the spotlight barely shows: use Aurora.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Dot Spotlight to my app and wire it to my own data.
  • I need a quiet hero or feature background with a soft light that follows the pointer. Set that up with the Knowns UI Dot Spotlight.
  • Which Dot Spotlight props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "dot-spotlight" }) and search_docs({ query: "dot spotlight" }).

Need help?

Stuck on Dot Spotlight, or found something off? We read every message.