The Code Collection, Vol. 2

Cursor Spotlight Reveal

Move the light around the canvas to reveal what’s waiting in the dark. Perfect for dramatic images, launches, portfolios, or anything worthy of a little attention.

Put your content center stage.

steal the spotlight

CURSOR SPOTLIGHT

Add an interactive spotlight to your Showit website. Visitors can move the spotlight around the canvas to reveal the content underneath.

WHAT YOU'LL NEED

A Showit canvas with the images, text, buttons, or other content you want to place under the spotlight.

The Cursor Spotlight code.


HOW TO INSTALL


01 — CHOOSE YOUR CANVAS

Choose the Showit canvas where you want the spotlight effect to appear.

Design the canvas normally using your own images, text, buttons, and other Showit elements.


02 — ADD THE CLASS SELECTOR

Select the canvas and go to:

Advanced → Class Selectors

Add:

spotlight-canvas

Do not include a period before the class name.


03 — ADD THE CODE

Open:

Page → Advanced Settings → Page Loaded JavaScript

Copy and paste the entire Cursor Spotlight code.

Do not add `<script>` tags.


04 — CUSTOMIZE YOUR SPOTLIGHT

Near the top of the code, find the CUSTOMIZE HERE section.

You can customize:

DARKNESS — Controls how dark the area outside the spotlight appears.

SPOTLIGHT_SIZE — Controls the size of the spotlight on desktop.

MOBILE_SPOTLIGHT_SIZE — Controls the size of the spotlight on mobile.

EDGE_SOFTNESS — Controls how soft or diffused the edge of the spotlight appears.

START_X — Controls the horizontal starting position of the spotlight.

START_Y — Controls the vertical starting position of the spotlight.

You do not need to edit anything below:

NO EDITING NEEDED BELOW THIS LINE


05 — PREVIEW + TEST

Preview your website.

On desktop, move your cursor across the canvas to guide the spotlight and reveal the content underneath.

On mobile, tap anywhere on the canvas to move the spotlight to that location.

If your canvas contains buttons or links, test them in Preview to make sure everything is working correctly.


QUICK INFO

DIFFICULTY — Easy

REQUIRES — Canvas Class Selector + Page Loaded JavaScript

MOBILE FRIENDLY — Yes

CODING KNOWLEDGE — Not required