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. Don't defer what people search the page for: until it renders, find-in-page and screen readers can't see it.
Basic
image below mounts only when within 200px of the viewport
rootMarginstarts it before it's visible (200px ahead by default);minHeightholds space so the page doesn't 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 | — |