Kinetic UI
Back to Introduction
Mouse Interactions

Flashlight Reveal

A pitch-black section where your cursor acts as a physical spotlight to reveal the vibrant content underneath.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add flashlight-reveal

An incredibly visual discovery mechanic. Built using CSS mask-image and Framer Motion's high-performance useMotionTemplate, this component overlays a pitch-black layer on top of a vibrant gradient layer, dynamically punching a perfect spotlight hole exactly where your cursor is hovering.

Live Preview

Flashlight Reveal

Spotlight Mask

Move your cursor over the dark box

DISCOVER

DISCOVER

Installation

npx kinetic-ui-cli@latest add flashlight-reveal

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

import { FlashlightReveal } from "@/components/creative/flashlight-reveal";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { FlashlightReveal } from "@/components/creative/flashlight-reveal";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <FlashlightReveal
        text="example"
        cursorSize{10}
      />
    </div>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.