Calm motion: animations on this site only fade, with no movement
DeferredContent
Render when scrolled into view
Content rendered only when it scrolls near the viewport: a heavy chart, an embed, comments at the end of a long page. Do not defer what people search the page for: until it renders, find-in-page and screen readers cannot see it.
Basic
image below mounts only when within 200px of the viewport
rootMarginstarts it before it is visible (200px ahead by default).minHeightholds space so the page does not jump.#placeholdershows until then.@loadfires once, including where IntersectionObserver is missing and it renders at once.
Usage
ts
import { BlessDeferredContent } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
rootMargin | string | "200px" | |
minHeight | string | "1px" |
Events
| Name | Payload | Description |
|---|---|---|
load | [] |
Slots
| Name | Scope | Description |
|---|---|---|
default | — | |
placeholder | — |