Magnetic lattice hero
- Lab Skill
- v0.2.0
- Web design
An interactive hero section whose canvas grid bends toward the pointer and ripples on every click.
ตัวอย่าง
English site
ตัวอย่างนี้ทำงานในเฟรมแบบ sandbox ที่ไม่มีสิทธิ์เข้าถึงหน้านี้
รันออนไลน์
รันตัวอย่างของ Magnetic lattice hero ใน SandBase sandbox แล้วดูผลลัพธ์ได้ที่นี่
สิ่งที่คุณจะได้รับ
Bring the headline, supporting copy and calls to action for your hero. The Skill returns a single HTML section with two themes, a theme toggle and reduced-motion handling; no dependencies.
วิธีการทำงาน
- 01
Write the hero copy
Magnetic Lattice Hero needs only the badge, headline, supporting copy and calls to action for one hero section. The Agent collects what the hero must say and where each button goes, picks en or zh-CN, and copies assets/template.html to work/src.html. Every text block marked REPLACE and every link pointing at # gets real content.
- 02
Tune the lattice if asked
The engine, both themes and the pointer handling are already written. Small changes go through two constants: SETTINGS for grid spacing, pull radius and strength, easing, ripple speed and ripple size, and THEMES for the backdrop, strand, accent and ring colours of the midnight and mono themes. No images are added; anything extra is inline SVG or CSS.
- 03
Build and test the interaction
On Node 18 or newer, node scripts/inline-assets.mjs work/src.html work/index.html produces the file and node scripts/validate.mjs work/index.html --mode site --site-lang en must exit 0. Add --browser --screenshot work/shots for a local Chrome or Edge pass, then move the pointer and click in a browser yourself to confirm the grid bends and ripples.
คำถามที่พบบ่อย
What does Magnetic Lattice Hero do?
Magnetic Lattice Hero renders a canvas grid of faint strands and junction dots that bends toward the pointer and sends a ripple through the lattice on each click. It glows violet in the midnight theme or white in the mono theme, only where the visitor interacts, under centred hero copy. It is one section, not a whole site.
Does Magnetic Lattice Hero respect reduced motion?
Yes. Magnetic Lattice Hero ships with reduced-motion handling built in, alongside its two themes and a theme toggle. Keep that handling when you tune SETTINGS, and check the result with reduced motion switched on as well as off.
Does Magnetic Lattice Hero have dependencies?
No. Magnetic Lattice Hero is a single-file engine with no libraries and no external assets, and its build and validate scripts have zero dependencies. No key is needed and no model is called, so producing the hero brings no SandBase charge. Node runs the scripts.
Can Magnetic Lattice Hero use my brand colour?
Yes. Magnetic Lattice Hero keeps its colours in the THEMES constant, where each theme has a backdrop, strand, accent and ring value. Put your brand colour in the accent. Never link a font from another site, because the page must stay self-contained.
What output does Magnetic Lattice Hero give?
Magnetic Lattice Hero gives a single HTML file containing the hero section, written to work/index.html after inlining. In a framework project it serves as a visual and behavioural reference, because the validator only checks standalone HTML files.
Skills เพิ่มเติม
Skills ทั้งหมดสำหรับ Web design →
Baked 3D Story Site
A three-page 3D story site with baked light, scroll stops that loop and a shader cut between pages, in one offline file.

UI Finishes
Metal, jewel, halo, roll, fill, offset and ring buttons, media cards, glass and textures, each checked in rest, hover, focus and pressed for real contrast.

Headline Motion
Headlines, labels and numbers that rise, decode, type, rotate, count and draw themselves without moving the layout, measured in a real browser.

Scroll Chapters
Long pages told chapter by chapter: a pinned stage, sliding panels, a text crawl, lit paragraphs, stacking cards and drifting columns, checked in a real browser for dead scroll.

Scroll 3D Product Site
A complete product website where scroll turns, opens and takes apart a live 3D model, with every video and image rendered from that model, in one offline file.

Landing Page System
A complete single-file landing page with a conversion structure and a shared visual system, checked by a rendered-page audit before delivery.

