Skip to content

Parallax ​

Background that scrolls slower

A background image that moves slower than the page as you scroll, behind a heading or a quote. It is decoration: nothing may depend on it, and it holds still under reduced motion.

Basic
scroll
  • speed (0 fixed – 1 with the page); height of the band. alt stays empty unless the image says something the text doesn't.

Usage ​

ts
import { BlessParallax } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
srcstring—
heightstring"320px"
speednumber0.50 = fixed, 1 = scrolls with page
altstring""

Slots

NameScopeDescription
media—
default—

Released under the MIT License. Character names and artwork belong to their owners.