New to Claude Skills? Learn how to install them →

mengto on GitHub

Ambient Section Particles

Free

Create dynamic particle effects in bounded sections.

by mengto4.6k stars on mengto/skills
1 views
Updated Aug 9, 2026
Get this skill

Free · Opens the source repo

What Ambient Section Particles does

Ambient Section Particles is a skill designed to enhance web sections with configurable particle effects that add atmosphere without detracting from the main content. It allows developers to create a visually appealing environment using particles that can represent elements like petals, leaves, or confetti. The skill is particularly useful for designers looking to evoke specific moods or themes within their web applications while ensuring that the user experience remains primary.

The skill provides a flexible configuration system where users can define particle properties such as count, gravity, wind, sway, speed, size, and opacity. This allows for a tailored visual experience depending on the context of use. The particles can be rendered using different techniques, including canvas for high-performance scenarios or DOM/SVG for smaller, styled elements. This adaptability ensures that the skill can be used effectively across various devices and performance profiles.

To integrate the particles, developers must ensure that the section containing the particles is properly configured with positioning and overflow settings. The skill supports multiple operational modes for particle behavior, such as recycling or settling, which can be selected based on the desired visual effect. Additionally, it includes performance optimizations like pausing animations when the section is not visible, ensuring that resources are not wasted on invisible elements.

Overall, Ambient Section Particles is ideal for web developers and designers who want to add a layer of interactivity and visual interest to their sections without compromising usability. It strikes a balance between aesthetic appeal and functional design, making it a valuable addition to any web project.

When to use it

Use this skill when you want to create engaging visual effects in specific sections of your web application, particularly when those effects should not interfere with user interactions.

When not to use it

Avoid this skill if your project requires full-page particle effects or if performance is a critical concern on low-powered devices without appropriate optimizations.

What you can build with it

Creating a Festive Atmosphere

Use particles to simulate falling snow or confetti during holiday promotions, enhancing user engagement.

Enhancing Brand Identity

Incorporate branded particles that reflect your company's colors and style, adding a unique touch to your web sections.

Improving User Experience

Utilize particles to guide user attention subtly without overwhelming the interface, maintaining focus on key content.

How to install Ambient Section Particles

View source

1. Install with the skills CLI

npx skills add mengto/skills/ambient-section-particles --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by mengto

Ambient Section Particles

Build particles as a bounded atmosphere layer, not as a page-wide screensaver. Keep the content primary and stop work when the effect cannot be seen.

Choose the renderer

  • Use canvas for roughly 40 or more small particles, frequent motion, pointer forces, or simple procedural shapes.
  • Use DOM or inline SVG for a small count of branded fragments that need individual styling or semantic labels.
  • Use WebGL only for thousands of particles, depth, shaders, or real 3D behavior. Cap device pixel ratio and provide a static fallback.

Start with the least expensive renderer that preserves the desired shape language.

Define one configuration

const particles = {
  count: 54,
  gravity: 7,
  wind: -3,
  sway: 16,
  speed: [8, 18],
  size: [4, 12],
  opacity: [0.18, 0.62],
  rotation: [-0.8, 0.8],
  mode: "recycle",
  pointerRadius: 110,
  maxDpr: 2
};

Scale density by container area, then clamp it for mobile and low-power devices. Do not derive count from viewport width alone.

Layer the section

  1. Give the section a positioning context and clip overflow when particles should remain bounded.
  2. Place the particle surface behind content but above the background.
  3. Set the layer to pointer-events: none; listen for pointer movement on the section.
  4. Reserve a quiet content zone or lower density behind long text and controls.
  5. Keep controls and links in normal DOM stacking with visible focus.

Run the simulation

  • Seed particles inside or just above the container bounds.
  • Update gravity, wind, phase-based sway, rotation, opacity, and position from elapsed time.
  • Clamp large time deltas after background tabs or stalled frames.
  • Use one requestAnimationFrame loop for the whole layer.
  • Resize with ResizeObserver; cap canvas backing resolution at min(devicePixelRatio, maxDpr).
  • For pointer disturbance, apply a small distance-based force and let particles settle back naturally. Never attach a listener per particle.

Support explicit end modes:

  • recycle: return particles above the section after exit.
  • exit: remove particles after they leave the bounds.
  • settle: resolve into a shallow visual pile with a strict height cap.
  • static: render a deterministic still composition.

Stop invisible work

Use IntersectionObserver to start only when the section is visible. Cancel animation frames when it exits or document.hidden becomes true. Resume from the current simulation state instead of spawning a second loop.

On teardown, disconnect observers, remove resize and pointer listeners, cancel the frame, and release renderer resources.

Respect the reader

  • Under prefers-reduced-motion: reduce, render a sparse static arrangement or remove the layer.
  • Keep particles decorative and hidden from assistive technology.
  • Control opacity and contrast so motion never crosses the legibility threshold.
  • Avoid full-screen pointer repulsion, rapid direction changes, flashes, and large objects crossing form controls.
  • Pause decorative motion while a modal or critical task in the section is active when it competes for attention.

Verify

Test entry and exit pausing, background-tab recovery, fast resize, 390/768/1440 widths, device pixel ratio, pointer and touch input, reduced motion, section overflow, content focus, long text, route cleanup, and console errors. Confirm only one animation loop survives repeated mounts.

Use demo/index.html as the working reference and demo/PROMPT.md to recreate or remix it. Keep REFERENCES.md as the links-only implementation source list.

Frequently asked questions about Ambient Section Particles

Similar skills