Dusklayer
Sign in Get Pro
N° 0008SectionPro

Thread Process

A hand drawn thread sews itself down through the process steps as you scroll, and each node flares like a struck match.

Source files, Studio plan

34 KB of text that builds one HTML file. Paste it into Claude Code, Cursor or v0 to rebuild this page.

Open full page Live. Scroll inside the preview to play it.
Loading the layer
LooksShowing LinenEach look changes the colours of the live preview and goes into the prompt you copy.
Make it yoursYour brand, copy and colours go into the prompt you copy. Colours change the preview live.
Brand remix is a Pro feature at launch. It is open in the preview.

Overview

A sticky four to six step process for an invented bindery: one hand drawn thread sews itself down through the step nodes as you scroll, each node ignites like a struck match when the thread reaches it, and that step's card reveals line by line.

Signature momentThe thread arriving at the fourth node: the match flare lifts off the ring while the step's two lines and its fact settle in beside it.

  1. The thread

    One SVG path, 1.5 px, through every step node: a Catmull-Rom spline over seeded waypoints with 15 to 30 px swings and a tension that drifts per segment, so it reads as a hand and not a plotter. Nine seeds, nine different threads.

  2. Drawn by scroll

    stroke-dasharray draws it from 3% to 93% of a sticky section that is one viewport per step plus one. The thread chases the scroll with a lag you set (drawLag 0 to 1), so a fast scroll leaves it sewing for a beat.

  3. The match

    When the thread passes a hole the node ignites: a 5.5 px core pops in 60 ms, a flame shaped halo lifts 7 px and fades over 420 ms, one spark rises 16 px, then a 1 px ring with a dot stays lit. flareIntensity 0 to 1.5.

  4. Line by line

    Each step card is two sentences and a fact. They arrive 70 ms apart (40 to 120), each over 400 ms on an ease out expo, and leave in 160 ms if you scroll back up.

  5. Four, five or six steps

    steps rebuilds the rows, the section height and the thread; the page copy for six bindery steps is in the DOM and the label reads Step 4 of 6 in plain words. On phones the band stays and the rows slide under it.

  6. Nine looks, 45 KB

    Linen, Night Shift, Unbleached, Indigo, Graphite, Oxblood, Chalk, Moss and Quarto change page tone, thread colour, step count, spacing and flare. One HTML file, no images, no canvas, Lenis the only library.

Build details

Kind
Section
Plan
Pro
Tone
Light, Dark
Industries
SaaS, Agency, Education
Technique
SVG
Built with
Lenis 1.3.27, plain HTML, CSS and one ES module
Looks
9
Weight
44 KB, layer files only
Mobile performance
100
Accessibility
100
Fidelity Score
In review
Licence
Commercial, including client work. No redistribution. Read it
Version
1, updated 3 November 2026
Released
3 November 2026
Parameters, 14 of them, all live through DUSKLAYER.set()
ControlKeyRangeDefault
Stepssteps4 to 66
Thread colourthreadColorcolor#B8432B
Thread width (px)threadWidth1 to 2.51.5
Flare intensityflareIntensity0 to 1.51
Thread swing between holesswing0 to 10.7
Hand wobblewobble0 to 10.6
Seedseed1 to 99997
Thread lag behind the scrolldrawLag0 to 10.45
Line stagger (ms)revealStagger40 to 12070
Row spacingspacing0.8 to 1.61.4
Node size (px)nodeSize8 to 1612
Pagepagecolor#F3EFE7
Inkinkcolor#1B1917
Accent (buttons)accentcolor#B8432B

Something wrong with this layer? Report a problem and we fix it in the next version.

The prompt

One text file, 34 KB, 10 sections. Every number the page uses is in it, so another model can rebuild the layer without seeing this one.

  1. Role
  2. Output contract
  3. Design tokens
  4. Layout
  5. Scene: the thread
  6. Presets
  7. Motion
  8. Responsive and performance
  9. Acceptance checklist
  10. Customize

How to use it

  1. Pick a look. The look you choose above is written into the prompt’s parameter block.
  2. Copy the prompt. Paste it into Claude Code, Cursor or v0 as the first message of a new session.
  3. Make it yours. Change the brand name, copy, colours and fonts first; every placeholder is marked. Keep the structure.
  4. Check it. The prompt ends with an acceptance checklist. Run through it before you ship.
Read the opening of the prompt
# Thread Process: build prompt

## Role
You are a senior creative front-end developer. Build one self-contained `index.html`: the website of {{BRAND_NAME}}, an invented bindery in {{BRAND_PLACE}} that prints, folds, sews and cases books for publishers, museums and studios. The centrepiece is a sticky process section. One hand drawn thread (a single SVG path, 1.5 px) sews itself down through four to six step nodes as the visitor scrolls. When the thread reaches a node the node ignites like a struck match (a hot core, a flame shaped halo that lifts and fades in 420 ms, one spark) and settles to a 1 px ring with a dot, while that step's card reveals line by line (400 ms ease out expo per line, 70 ms apart). The left column holds the section heading and the current step's title; the right column holds the step rows. Around it, the page a real bindery would publish: a header, a short text hero, a commissions table with real looking numbers, a start a book band with prices and lead times, and a four group footer. Pure DOM, SVG and `requestAnimationFrame`; no canvas, no WebGL, no library except Lenis for smooth scroll. It must read as a company's site, not a demo.

## Output contract
- One file `index.html`, no build step, no framework: plain HTML, CSS in one `<style>`, and one `<script type="module">`. Under 120 KB; no images.
- Import map with one exact version: `"lenis": "https://cdn.jsdelivr.net/npm/lenis@1.3.27/dist/lenis.mjs"`. Load it with `import('lenis')` after first paint (`new Lenis({ lerp: 0.1, smoothWheel: true, autoRaf: false })`, driven by your own rAF with `lenis.raf(now)`); ignore failures; skip it entirely under `?capture=1` and reduced motion. Until it resolves, read `scrollY`.
- Fonts: preconnect to `fonts.googleapis.com` and `fonts.gstatic.com`, then one Google Fonts link, non-blocking (`media="print" onload="this.media='all'"`, a `<noscript>` copy), `display=swap`: `{{FONT_DISPLAY}}:wght@300;400;500` and `{{FONT_BODY}}:wght@400;500`. Two metric matched local fallbacks so copy does not reflow when the webfonts land:

[31,058 more characters. Copy the prompt to get all of it.]

More layers

Open the library

Ten customer quotes shine as stars. Point at one for a line, or click and the camera flies in to open it.

SectionPro

Three glass pricing cards turn liquid under your cursor. Switch to yearly and every digit rolls like an odometer.

SectionPro

Rows of invented client logos drift between fine field lines, bend away from your pointer and spring back into rhythm.

SectionFree