Skip to content

Dev - #42

Merged
andesvel merged 8 commits into
mainfrom
dev
Sep 23, 2026
Merged

Dev#42
andesvel merged 8 commits into
mainfrom
dev

Conversation

@andesvel

Copy link
Copy Markdown
Owner

This pull request replaces the static CSS grid background on the homepage with a new animated and theme-aware particle field. The main change is the introduction of the new Particles React component, which provides a performant, customizable, and accessibility-friendly canvas background. The homepage now imports and renders this component instead of the previous static background.

Homepage visual/background update:

  • Added a new Particles component (components/particles.tsx) that renders a canvas-based, animated particle field as the page background. This component adapts to theme changes, supports reduced motion for accessibility, and efficiently tracks scroll position so particles appear to move with the content.
  • Updated app/routes/home.tsx to import and render the Particles component, replacing the previous static CSS grid background. [1] [2]

The grid div was absolutely positioned against the initial
containing block, so it spanned exactly one viewport from the top of
the document: scrolling past the hero left the rest of the page on a
plain background. A fixed viewport layer covers every screen for the
entire scroll and skips scroll-driven repaints.
A fine pointer with no reduced-motion preference gets a subtle
background-position drift (max 10px) away from the cursor, lerped in
an rAF loop that stops once the pattern settles so idle sessions cost
no frames. Touch devices and reduced-motion users get the static
grid from the previous commit.
The 1px line grid read as graph paper; dots at the same 5% opacity
and 1lh rhythm read as soft texture. Same fixed layer, same cursor
drift, same fallbacks — only the background recipe changes.
Adapts the shadcn.io Particles background as the landing backdrop.
Colors resolve from the theme tokens (logo purple in light, zinc
gray in dark), the mouse position is tracked in a ref instead of
React state, and the DPR transform is set rather than multiplied so
repeated resizes do not zoom the particles.
Particles now live in document coordinates and are drawn offset by
the scroll position, so they travel with the content while the canvas
stays a viewport-sized layer. quantity becomes a density per viewport
and scales across the document; particles fade in and out as they
cross the visible screen, wrap only at the document edges, and
respawn within the current viewport band. Reduced motion keeps a
static field that still tracks scroll.
Landing backdrop: particle field that scrolls with the page
@andesvel
andesvel merged commit 381aef2 into main Sep 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant