Magnetic Lattice Hero

Create a dark interactive opening with a canvas grid that leans toward the pointer and sends expanding ripples through its lines when clicked. Magnetic Lattice Hero places normal HTML headline, supporting copy and actions above the field so the message remains usable. It is a dependency-free hero component with two dark themes and tunable motion, not a full landing-page or product backend.

What you get

  • A standalone HTML hero with inline styles, SVG icons and a vanilla 2D-canvas engine. It needs no library, build step, image asset, font download or external service; the supplied font stack falls back to installed system faces. The section can be integrated into a larger site or displayed in an iframe.
  • A lattice of fine horizontal/vertical strands and junction dots. Pointer proximity bends and brightens nearby nodes/segments, click or tap creates expanding radial displacement rings, and edge anchoring keeps the outer grid stable. HTML content stays layered above the canvas with normal link interaction.
  • Two dark presets: violet on midnight-blue black and monochrome white on black. Theme data supports brand accent/ring changes while keeping a very dark backdrop and faint resting lines. A tuning reference explains density, reaction radius/strength, pointer easing, ring speed/lifetime/displacement, border stiffness and junction glow.
  • Copy slots for optional badge, short headline, one or two supporting sentences and up to two real-destination actions, with optional small capability hints/proof row. Framework-mounting notes describe running the same engine on a stage element in the host lifecycle; reduced-motion and hidden-tab handling are present but need the implementation checks described below.

Before you choose

Keep the interaction subordinate to the message: readable HTML content, real CTA destinations and a faint resting grid. Preserve the supplied visual model while being precise about integration cleanup, motion preferences and device testing. A self-contained canvas effect is a hero resource, not a finished website or a tested cross-framework component.

Good fit

  • A launch, developer-tool or portfolio page wants a memorable interactive first screen while retaining a clear message and action.
  • A founder wants a dark responsive grid effect without adding an animation library or commissioning custom motion from scratch.
  • A site needs a locally rendered hero with no build tooling or runtime network dependency.

Not for

  • A light-background or pastel identity; both presets depend on a dark ground and brightness headroom.
  • A page that must avoid canvas entirely or allow no pointer-induced visual change whatsoever without further adaptation.
  • A request for complete landing content, pricing, account flows or a site builder beyond the hero section.

How to use

You say/magnetic-lattice-hero Build an interactive dark hero for my launch page that reacts to the mouse, with a headline and two CTA buttons.
  1. Provide a headline of roughly eight words or fewer, supporting line and action labels/destinations, or a product description from which the agent can draft them. Badge is optional, hints can be omitted and proof marks should name only actual supported providers/customers. Do not inherit decorative provider claims from placeholder text.

  2. Use the single HTML output for a standalone hero. Inside an existing React/Next, Vue/Nuxt, Svelte, Astro or plain site, inspect its conventions and mount the stage in the normal lifecycle. Keep one canvas with a 2D context, stage-local pointer coordinates and ordinary HTML content above it. Choose section height in CSS; the reference defaults to viewport height with a 480px minimum, which matters for a shorter embedded banner.

  3. Preserve the supplied engine instead of rebuilding the displacement model for a new brand. It eases the pointer, applies a cosine falloff plus a near-pointer dead zone, combines radial wave forces and multiplies mobility by distance from edges. Color/width interpolate along segments and charged junctions gain size/halo. These are visual forces, not a physical simulation or measured product capability.

  4. Choose midnight or monochrome and change accent/ring values for the brand while keeping backdrop dark. Resting strand opacity should stay around 0.10–0.18 so copy leads. Use a short message, good contrast and accessible CTA focus states; the canvas is decorative/hidden from assistive technology. Meaningful hint text should not inherit the reference’s aria-hidden wrapper if visitors need it to understand the offer.

  5. Tune one setting at a time when requested: cell spacing about 48–88px, reaction radius 160–320px, pull strength roughly 10–30px, easing 0.06–0.18, ring speed 260–480px/s, fade 0.6–1.4 and kick 10–24px. Keep pull strength below about a third of cell size to avoid crossed strands. These are reference ranges rather than a performance guarantee; check actual density and behavior on target hardware.

  6. Keep inline Lucide-style icons small and dim: badge/CTA/hints rather than an additional visual layer. Genuine AI-provider proof may use monochrome labeled brand marks, but the icon guide points to an examples file that is not present in this archive, so those assets are not supplied here. Omit the proof row or obtain approved marks separately; do not present a provider logo as the product’s own brand.

  7. Handle template removal and lifecycle explicitly. The guide says the optional theme switcher can go, but the boot script binds it without a null guard; removing the markup alone breaks that binding. The engine function is inside an immediately invoked script and returns only setTheme, with no destroy handle. A framework component therefore needs an exported/wrapped initializer and cleanup for animation frames, observers and listeners, plus a check for repeated mounts. These changes are integration work, not already-shipped cleanup support.

  8. Check reduced motion against actual behavior. Initial reduced motion suppresses the animation loop and draws a static grid, but pointerdown still adds a zero-radius wave and renders once. The supplied engine does not listen for changes to the media preference after initialization. For strict static behavior, suppress pointer effects, clear waves and respond to preference changes during integration. Hidden tabs stop/restart the loop; being scrolled out of view is not separately observed.

  9. Check input and scaling in context. Pointer coordinates subtract the stage bounds so a section below the fold or inside an iframe responds in the right place; clicks on .mlh-ui are excluded, while content/CTA pointerdown can still trigger waves without preventing navigation. Touch taps need actual device testing. Device-pixel ratio is capped at two and ResizeObserver falls back to window resize. On large/dense stages raise cell spacing first and review repeated taps because the wave array has no explicit count cap.

  10. Replace template headings/actions and remove every placeholder, then open the result to move/park/leave the pointer, click several positions, tap on phone and resize. Confirm strands relax, rings displace, edge rows stay pinned and text/actions remain legible/clickable. Test both themes, short/tall stages, keyboard navigation, hidden-tab return, initial and changed reduced motion, iframe offsets and framework remount/unmount. Report what was actually checked; no API key, image generation or paid usage is required for this hero.

Requirements and costs

You bring
Hero copy: headline, supporting line, and call-to-action labels/links (the Skill can draft them from a product description)
Dependencies
Not collected yet
Outside costs
Not collected yet
Publisher testing
v1.0.1 — Claude Code / Claude Desktop / Cowork / Codex / ChatGPT

FAQ

User reviews

—0 reviews

Select a star to share your experience.

No reviews yet. Ratings appear once readers share real experiences.

Similar Skills

View all skills