Background
Tiled texture layer
A decorative layer behind a page or a section: a tiled image, or the built-in hairline pattern. It is hidden from screen readers and never takes clicks.
Basic
pattern fallback
offset -40, opacity .4
mode="fixed"pins it to the viewport (put it once, at page level);absolute(default) fills the nearest positioned parent.offsetshifts the tile vertically, so neighbouring pages can use different parts of one image.- Keep text over it readable: lower
opacityrather than relying on the text colour.
Usage
ts
import { BlessBackground } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
src | string | — | tile image; omit for a built-in hairline pattern |
offset | string | number | 0 | vertical tile offset (number = px). Source site used 0 / -300 / -600 per page |
mode | "absolute" | "fixed" | "absolute" | fixed = viewport (use at page level); absolute = fills positioned parent |
opacity | number | 1 |