Text
JS behaviour
Dither backdrop
An animated ordered-dither field in the theme’s colours, painted on a canvas; it pauses off-screen and in hidden tabs and holds one still frame under reduced motion.
Real scenarios
The component as it is used in a product — not a specimen grid.
Support that speaks your customer’s language
Agents answering in Español, 日本語 and فارسی — in seconds.
The download portal
cell=5, matrix=4, fps=24 — coarser cells and fewer frames for a panel people stare at.
Where it pauses
The canvas stops painting off-screen and in hidden tabs, and under prefers-reduced-motion it holds one still frame — the rest of the page keeps behaving normally.
- Put it first inside a positioned, clipped section — everything after it stacks above.
- aria-hidden="true" already sits on the field; screen readers never see the noise.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| cell | number | null | CSS pixels per dither cell; bigger means coarser and cheaper. |
| matrix | number | null | The Bayer matrix: 4 or 8. |
| speed | number | null | The drift speed of the field. |
| fps | number | null | Frames-per-second cap — lower it to save battery. |
Snippet
<section style="position: relative; isolation: isolate; overflow: clip; display: grid; place-content: center; text-align: center; min-block-size: 24rem">
<x-nx::dither-backdrop :cell="3" :matrix="8" />
<h2>پشتیبانی به زبان مشتریات</h2>
<x-nx::button variant="primary" shape="pill">شروع رایگان</x-nx::button>
</section>