Cards JS behaviour

Infinite grid

An infinite drifting dot field with a pointer spotlight: the dots it touches light up and the density stepper in the corner tunes the mesh — a living hero layer.

Real scenarios

The component as it is used in a product — not a specimen grid.

A hero that never stands still

Drop it inside any positioned container and put your heading in the slot. Move the pointer: the dots it touches light up; the stepper in the corner tightens or loosens the mesh.

Infrastructure that never says “later”

The same dots in light and dark, left-to-right and right-to-left — the field drifts, your content stays put.

A denser field, a smaller cell

cell sets the starting mesh (16 px here) and min / max / step keep the corner stepper within your taste.

“It feels like the page is breathing under my text.”

Important props

Important props
Prop Type Default What it does
slot پیش‌فرض slot — The content over the field — say a hero’s heading and pitch.
cell int 28 The mesh’s cell size in pixels.
min / max / step int 12 / 48 / 4 The range and step of the corner density stepper.

Snippet

<div style="position: relative">
    <x-nx::infinite-grid>
        <h2>شبکه‌ای که تمامی ندارد</h2>
        <p>نشانگر را حرکت بده: نقطه‌هایی که لمس می‌کند روشن می‌شوند.</p>
    </x-nx::infinite-grid>
</div>