Attract CTA
A newsletter band whose button is a magnet. As the pointer comes near, brass filings behind it turn, stream in and stand round it in a bristling ring, and stay there.
Built with Filings
What it is for
Make the one action on a signup band physically attractive without a word of hype: the button pulls, the visitor sees it pull, hesitation leaves a visible trace, and the form underneath is a real, honest form.
Everything you set here is what the Code and Prompt tabs give you.
Seats open in 11 days. Want one email that morning?
Datasheet
- Mechanism
- Button as magnet, Ring magnet shape, Proximity power, Iron remembers, Honest form, Container query recomposition
- Stack
- Vanilla ES modules, CSS, WebGL2, Canvas 2D
- Needs
- Filings
- States
- 10 documented
- Version
- 0.1.0
- Licence
- With a Pass
States
- WaitingAn even scatter of filings behind the form; the button's magnet is off; a small tag says to bring the pointer closer.
- ApproachingThe magnet is switched on by nearness (full on the button, off at the reach, in twentieths); the filings turn toward the button, clear a moat and gather into a ring 9–36px outside its edge.
- LeavingThe magnet goes off, but the gathered iron stays where it went, as iron does; the sheet settles and sleeps.
- KeyboardFocus in the field or on the button switches the magnet fully on until focus leaves the form.
- Invalid addressThe section says so in its own voice, marks the field invalid and returns focus to it.
- Sent or notA handled subscribe event shows the thank-you line; with an action the form posts; with neither, it says plainly that nothing was sent. Either way the magnet goes full on and the sheet is tapped at the button.
- PaletteBrass filings on black, or dark iron on bone paper with an oxide-red accent.
- NarrowUnder 820px one column: the copy on solid ground, the form on the iron below; under 480px the button fills its row with room for its ring.
- Reduced motionThe iron is gathered round the button on the first paint; nothing moves.
- Off screenThe sheet's loop pauses; the block runs nothing of its own.
Notes
Original composition; Remanence and its copy are invented. The ring magnet is Filings' shape option, drawn from the button's measured box. Faces: Crimson Pro and Instrument Sans (SIL OFL 1.1) as WOFF2, licences beside them.
Anatomy
Button as magnet, Ring magnet shape, Proximity power, Iron remembers, Honest form, Container query recomposition
Usage notes
Make the one action on a signup band physically attractive without a word of hype: the button pulls, the visitor sees it pull, hesitation leaves a visible trace, and the form underneath is a real, honest form.
Options
| Option | Type | Description |
|---|---|---|
| eyebrow | text | Eyebrow |
| title | text | Name of the letter |
| subtitle | text | Standfirst |
| body | text | Paragraph |
| proof | text | Separated by “·”; up to four. |
| fieldLabel | text | Field label |
| placeholder | text | Field placeholder |
| button | text | Button (the magnet) |
| fine | text | Fine print |
| success | text | Thank-you line |
| action | text | Where the form posts. Empty: nothing is sent, and the section says so. |
| palette | enum | Brass filings on black, or dark iron on bone paper. |
| reach | number | How near the pointer must come before the button starts to pull. |
| light | number | Light from (degrees) |
Methods
- update
- level
- sheet
- root
- destroy
How it works
Original composition; Remanence and its copy are invented. The ring magnet is Filings' shape option, drawn from the button's measured box.