Dusklayer
Sign in Get Pro

Docs

How a layer is built, how to use its prompt, and what the numbers on each page mean.

Using a prompt

Every layer page has a Copy the prompt button. The prompt is one text file, 30 to 45 KB, that describes the layer completely: the DOM section by section with its copy, the design tokens, every numeric constant of the motion and the scene, any shaders verbatim, the runtime API, the responsive rules and an acceptance checklist.

  1. Pick a look on the layer page. Its values are written into the prompt’s parameter block.
  2. Copy the prompt and paste it as the first message of a new session in Claude Code, Cursor or v0.
  3. Ask for one HTML file with everything in it first. It is the easiest thing to check against the preview.
  4. Then change the brand name, the copy, the colours and the fonts. Every placeholder is marked in the prompt.
  5. Run the acceptance checklist at the end of the prompt before you ship.

Porting to a framework

Once the HTML build matches the preview, ask your tool to move it into your stack. The layers keep their markup, styles and one ES module together, so a Next.js, Astro or Vue port is mostly a matter of where the module runs.

Looks and the runtime API

A look is a named set of parameter values. Every layer ships with nine, and all of them drive the same page, so switching looks never changes the structure.

Every layer exposes window.DUSKLAYER with params, set(values), pause(), resume() and a ready promise. The library’s preview uses set() to recolour the page live; your own site can do the same. The URL accepts ?preset=001 to 008, ?reduced=1 to force the reduced motion version and ?quality=low for slower devices.

Inside an iframe a layer also listens for postMessage from its host ({source: 'dusklayer-host', type: 'set' | 'pause' | 'resume'}) and reports when it is ready and how fast it is running ({source: 'dusklayer', type: 'ready' | 'fps'}).

Fidelity Score

The score says how closely a blind rebuild matches the original. A fresh model is given the prompt and nothing else, with no access to the original files, and asked to build the layer. Both pages are then captured with the same clock, pointer path and scroll keyframes: five moments each on desktop and on a phone, ten frame pairs in all.

Each pair is compared with structural similarity on greyscale frames, and the five dominant colours of each page are compared as a palette. The score is 80% similarity and 20% palette, rounded to a whole number. Layers ship at 85 and above; the contact sheet of every comparison is published with the score.

Scores marked In review belong to layers whose prompt has been written but not yet rebuilt and measured.

Performance receipts

Each layer lists its mobile Lighthouse performance and accessibility scores, measured with Lighthouse 13 on a simulated midrange phone over a slow 4G connection. Weight is the size of the layer’s own files, not counting fonts and CDN libraries. Product films load their frames lazily after first paint and only for the screen size in use.

Every layer also honours the reduced motion setting with a still or crossfade version, keeps real text in the DOM, and holds contrast in every state, not only at the top of the page.

Receipts for every layer
LayerKindMobile performanceAccessibilityWeightFidelity
Monolith BloomSceneMeasuring10035 KB93
Magnet MarqueeSectionMeasuring10035 KB99
Liquid PricingSectionMeasuringMeasuring34 KBIn review
Suspended SplashProduct film1001007.8 MBIn review
Material ShiftProduct film991003.8 MBIn review
Orbit & ExplodeProduct film991007.6 MBIn review
Silk MeshGradient10010041 KBIn review
Thread ProcessSection10010044 KBIn review
Quote ConstellationSection10010046 KBIn review
Night LoomScene10010080 KBIn review
HalationGradient10010049 KBIn review
Sonar FieldScene10010058 KBIn review
Pollen DriftScene100100132 KBIn review
Paper AtlasScene100100100 KBIn review
Cathedral GridScene10010095 KBIn review
Clinic NoirTemplate100100125 KBIn review
Signal OrchardScene10010066 KBIn review
Ferro MarkScene10010070 KBIn review
Launch OrchardTemplate100100127 KBIn review
Chrome ScriptScene10010086 KBIn review
Ledger SwissTemplate100100115 KBIn review
Tidal GlassScene10010080 KBIn review

Dusklayer MCP

The connector puts the library inside your coding agent: search layers by kind, tone and industry, read a layer’s parameters, fetch its prompt with a chosen look applied, and on Studio, fetch the source files and plan a whole page from one sentence. It is in testing now and opens with the launch for Pro and Studio, with free layers available to everyone.

Plans

Free layers come with the full prompt and all nine looks. Pro opens every layer and the connector. Studio adds the source files, the site planner and unlimited brand remix. See the pricing page for the full table.

Licence

Every layer is original work with invented brands. Your plan lets you use the layers, prompts and, on Studio, the source files in your own projects and in client work, as many as you like. You may not resell or redistribute them as layers, templates or prompts. The licence has the details, and the terms and refund policy cover plans and billing.

Support

Something wrong with a layer, or a question these docs do not answer: write through the contact page and we reply by email, usually within two working days. Every layer page also has a link to report a problem with that layer, which fills in the details for you.