Spotlight mark

A stroked logo lit by a light that follows the pointer across it on a spring.

Features

  • The stroke is a radial gradient from the accent to the ink, centred on the pointer.
  • The light glides on a snappy spring; under reduced motion it rests.

Use it for

  • Monograms and logos in a header.

On this site

Installation

  1. Get runets.
    git clone https://github.com/ziyam-khan/runets
  2. Copy these files into your project, keeping their folders.
  3. Install what they use.
    pnpm add react motion
  4. Load the styles once. Bring your own base tokens, or use runets’ default theme.
    import 'runets/styles/theme.css'
    import 'runets/styles/kit.css'

API

PropTypeWhat it does
dstringPath data, drawn as a stroke.
width / heightnumberThe view box (80 by 48).
strokenumberStroke width (3).

Accessibility

Source

The code is in src/kit/spotlight-mark.tsx in runets, MIT licensed.