Modus UI

Sphere Sketch

Web (React)

Italic serif letters wrapped around a turning globe; click to shake some loose.

1,900 italic serif letters and printer's marks wrapped around a turning globe, inked in the theme foreground with the side facing you picked out in the primary colour. Hover to spin faster, click to shake letters off; they tumble away in the primary colour and regrow. Colours and the typeface come from the theme, so it follows light and dark mode and the palette picker. It fills its positioned parent, pauses when off screen and renders a still frame when the user prefers reduced motion.

Modus / Sphere Sketch

Installation

CLI

npx @modus-ui/cli add sphere-sketch

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/sphere-sketch.tsx.
  3. Paste the code.

Usage

tsx
import { SphereSketch } from "@/components/ui/sphere-sketch";

export default function Example() {
  return (
    <div className="relative h-[500px] w-full overflow-hidden">
      <SphereSketch />
    </div>
  );
}

Props

PropTypeDefaultDescription
scalenumber1Scales the drawing (clamped 0.65–1.5).
opacitynumber1Overall opacity (clamped 0.1–1).
huenumber0Hue rotation in degrees (clamped -180–180).
saturationnumber1Saturation multiplier (clamped 0–2).
brightnessnumber1Brightness multiplier (clamped 0.4–1.8).
inkColorstringNoneAny CSS colour for the type; defaults to the theme foreground.
backgroundColorstringNoneBackground colour; defaults to the theme background.
classNamestringNoneExtra classes for the wrapper.

Comments

  • No comments yet.