---
title: "Framework"
description: "A one-page site for an open-source web framework - a woven thread of light behind the hero, the install command one click away, a live terminal that scaffolds a project, the code in tabs, benchmarks that draw themselves and the release as a tag. Three looks: Loom, Neon and Blueprint."
slug: "showcase-framework"
---

import { DocPage, PageHeader, DocText, DocLink } from "../../lib/components/index";

<DocPage meta={meta}>

<PageHeader slug="showcase-framework" title="Framework" introStyle="max-width:42rem;">
  A one-page site for an open-source web framework - a woven thread of light behind the hero, the install command one click away, a live terminal that scaffolds a project, the code in tabs, benchmarks that draw themselves and the release as a tag. Three looks: Loom, Neon and Blueprint. One of the <DocLink href="website-showcase.html">Showcase</DocLink> sites.
</PageHeader>

<div class="flex flex-wrap items-center gap-2 mb-6">
  <a class="btn" href="full-showcase-framework.html" target="_blank" rel="noopener"><i data-lucide="maximize-2"></i> Open full screen</a>
</div>

```html example label="Weft, a TypeScript framework" schema="none" hint="The Look select switches the identity: Loom (paper and indigo thread), Neon (a night screen in cyan and magenta) and Blueprint (white lines on drafting blue, a grid behind). The hero's light is a Shader (warp) in the look's colours; the terminal is live - after its replay, type help, weft routes or weft build; Start a project builds the create command as you fill the form." previewStyle="align-items:stretch;padding:0;"
<style>
  @import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Instrument+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');
  /* Weft: an open-source TypeScript framework whose idea is one thread - server and client code in the same file,
     woven at build time. Layout: the hero as the pitch (headline, the install command, a woven thread of light),
     then what it does as a bento of tiles, the code in tabs beside a live terminal, the numbers as bars, the voices,
     the adapters, the release, a closing call. */
  #sc-weft {
    --background: oklch(0.975 0.008 85);
    --foreground: oklch(0.22 0.03 270);
    --card: oklch(0.995 0.005 85);
    --card-foreground: var(--foreground);
    --popover: var(--card);
    --popover-foreground: var(--foreground);
    --muted: oklch(0.94 0.012 85);
    --muted-foreground: oklch(0.45 0.03 270);
    --border: oklch(0.22 0.03 270 / 0.14);
    --input: oklch(0.22 0.03 270 / 0.2);
    --primary: oklch(0.47 0.2 275);
    --primary-foreground: oklch(0.98 0.01 275);
    --secondary: oklch(0.94 0.02 275);
    --secondary-foreground: var(--foreground);
    --accent: oklch(0.93 0.025 275);
    --accent-foreground: oklch(0.22 0.03 270);
    --ring: var(--primary);
    --radius: 0.75rem;
    --radius-sm: max(0px, calc(var(--radius) - 4px));
    --radius-md: max(0px, calc(var(--radius) - 2px));
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 4px);
    /* the second thread (a warm red through the indigo) and the ink that writes in the brand colour */
    --wf-thread: oklch(0.62 0.2 35);
    --wf-ink: oklch(0.45 0.2 275);
    --wf-note: oklch(0.93 0.11 95);
    --wf-note-ink: oklch(0.25 0.04 80);
    --wf-code: oklch(0.2 0.03 275);
    color-scheme: light;
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    width: 100%;
    overflow-x: clip;
    background: var(--background);
    color: var(--foreground);
    font-family: 'Instrument Sans', var(--font-sans);
    container: sc-weft / inline-size;
  }
  #sc-weft[data-look='neon'] {
    color-scheme: dark;
    --background: oklch(0.16 0.03 280);
    --foreground: oklch(0.95 0.02 280);
    --card: oklch(0.2 0.035 280);
    --muted: oklch(0.23 0.035 280);
    --muted-foreground: oklch(0.78 0.04 280);
    --border: oklch(0.95 0.02 280 / 0.14);
    --input: oklch(0.95 0.02 280 / 0.2);
    --primary: oklch(0.84 0.14 200);
    --primary-foreground: oklch(0.18 0.04 220);
    --secondary: oklch(0.25 0.04 280);
    --secondary-foreground: var(--foreground);
    --accent: oklch(0.27 0.05 280);
    --accent-foreground: oklch(0.95 0.02 280);
    --radius: 0.5rem;
    --wf-thread: oklch(0.72 0.24 340);
    --wf-ink: oklch(0.84 0.14 200);
    --wf-note: oklch(0.72 0.24 340);
    --wf-note-ink: oklch(0.16 0.03 280);
    --wf-code: oklch(0.12 0.03 280);
  }
  #sc-weft[data-look='blueprint'] {
    color-scheme: dark;
    --background: oklch(0.38 0.12 258);
    --foreground: oklch(0.98 0.01 250);
    --card: oklch(0.34 0.11 258);
    --muted: oklch(0.42 0.11 258);
    --muted-foreground: oklch(0.88 0.04 250);
    --border: oklch(0.98 0.01 250 / 0.45);
    --input: oklch(0.98 0.01 250 / 0.55);
    --primary: oklch(0.92 0.13 98);
    --primary-foreground: oklch(0.25 0.06 258);
    --secondary: oklch(0.44 0.11 258);
    --secondary-foreground: var(--foreground);
    --accent: oklch(0.45 0.11 258);
    --accent-foreground: oklch(0.98 0.01 250);
    --radius: 0rem;
    --wf-thread: oklch(0.98 0.01 250);
    --wf-ink: oklch(0.92 0.13 98);
    --wf-note: oklch(0.98 0.01 250);
    --wf-note-ink: oklch(0.3 0.1 258);
    --wf-code: oklch(0.27 0.09 258);
  }
  #sc-weft [hidden] {
    display: none !important;
  }
  /* code in syntax colours: Shiki's token spans carry both themes; the listing's own ground picks one */
  #sc-weft [data-code-ground='light'] span[style*='--shiki-light'] {
    color: var(--shiki-light);
  }
  #sc-weft [data-code-ground='dark'] span[style*='--shiki-dark'] {
    color: var(--shiki-dark);
  }
  #sc-weft :is(h1, h2, h3) {
    font-family: 'Bricolage Grotesque', var(--font-sans);
    text-wrap: balance;
  }
  #sc-weft code,
  #sc-weft kbd {
    font-family: 'JetBrains Mono', var(--font-mono);
  }
  /* one 78rem column through every band */
  #sc-weft .wf-band {
    position: relative;
    isolation: isolate;
    padding-block: clamp(3.5rem, 8vw, 6rem);
    padding-inline: max(clamp(1rem, 4vw, 2.5rem), calc((100% - 78rem) / 2));
  }
  #sc-weft .wf-band[data-tone='muted'] {
    background: var(--muted);
  }
  #sc-weft[data-look='blueprint'] .wf-band[data-tone='muted'] {
    background: color-mix(in oklch, var(--muted) 55%, transparent);
  }
  /* Blueprint: the drafting grid behind the whole page, only in that look */
  #sc-weft .wf-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    color: oklch(0.98 0.01 250 / 0.13);
    pointer-events: none;
  }
  #sc-weft:not([data-look='blueprint']) [data-for='blueprint'] {
    display: none;
  }
  /* the Site Header: the woven mark, the sections, the stars, the look and the mode */
  #sc-weft .mk-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: color-mix(in oklch, var(--background) 82%, transparent);
    backdrop-filter: blur(10px);
    border-block-end: 1px solid var(--border);
    color: inherit;
  }
  #sc-weft .mk-header-inner {
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    max-width: none;
    min-height: 4.5rem;
    padding-inline: max(clamp(1rem, 4vw, 2.5rem), calc((100% - 78rem) / 2));
  }
  #sc-weft :is(.mk-header-brand, .mk-footer-brand) {
    gap: 0.55rem;
    color: inherit;
  }
  #sc-weft .wf-mark {
    flex: none;
    width: 1.75rem;
    aspect-ratio: 1;
    background:
      repeating-linear-gradient(90deg, var(--primary) 0 0.2rem, transparent 0.2rem 0.4rem),
      repeating-linear-gradient(0deg, var(--wf-thread) 0 0.2rem, var(--background) 0.2rem 0.4rem);
    box-shadow: inset 0 0 0 1px var(--border);
  }
  #sc-weft :is(.mk-header-name, .mk-footer-brand-name) {
    color: inherit;
    font:
      800 1.5rem/1 'Bricolage Grotesque',
      sans-serif;
    letter-spacing: -0.02em;
  }
  #sc-weft .mk-header-nav {
    display: flex;
    margin-inline-start: auto;
  }
  #sc-weft .nav-menu-list {
    flex-wrap: wrap;
  }
  #sc-weft .nav-menu-link {
    color: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
  }
  #sc-weft .mk-header-actions {
    gap: 0.5rem;
  }
  #sc-weft .wf-stars {
    gap: 0.35rem;
    font-variant-numeric: tabular-nums;
  }
  /* the hero: the pitch over a woven thread of light */
  #sc-weft .wf-hero {
    overflow: clip;
    padding-block: clamp(4rem, 11vw, 8.5rem) clamp(4rem, 9vw, 7rem);
  }
  #sc-weft .wf-hero > .shader {
    opacity: 0.4;
  }
  /* a shade behind the copy keeps the light from running through the words */
  #sc-weft .wf-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(70% 80% at 30% 45%, var(--background) 25%, transparent 80%);
  }
  #sc-weft .wf-hero-copy {
    display: grid;
    gap: 1.5rem;
    max-width: 50rem;
  }
  #sc-weft .wf-release {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1.4rem 0.35rem 0.9rem;
    background: var(--foreground);
    color: var(--background);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
  }
  #sc-weft .wf-release:is(:hover, :focus-visible) {
    background: var(--primary);
    color: var(--primary-foreground);
  }
  #sc-weft .wf-hero h1 {
    margin: 0;
    font-size: clamp(2.75rem, 7.5vw, 5.75rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.035em;
  }
  /* the turning word: its window is taller than the headline's tight lines (1lh of 1.25, the glyphs' whole height),
     so no edge of the next word shows; the negative margins keep the line as tight as the others. It closes the
     first line - the window is as wide as its longest word, so nothing follows it on the line */
  #sc-weft .wf-hero h1 .text-rotate {
    --text-rotate-duration: 9s;
    margin-block: -0.15em;
    color: var(--wf-ink);
    line-height: 1.25;
  }
  #sc-weft .wf-lede {
    max-width: 38rem;
    margin: 0;
    color: var(--muted-foreground);
    font-size: clamp(1.0625rem, 2vw, 1.25rem);
    line-height: 1.55;
    text-wrap: pretty;
  }
  /* the thread under the headline: one line, woven over and under, drawn while you read */
  #sc-weft .wf-thread {
    display: block;
    width: min(100%, 34rem);
    height: 1.75rem;
    overflow: visible;
  }
  #sc-weft .wf-thread path {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: wf-draw 2.4s 0.3s cubic-bezier(0.6, 0, 0.2, 1) forwards;
  }
  #sc-weft .wf-thread path:first-child {
    stroke: var(--primary);
  }
  #sc-weft .wf-thread path:last-child {
    stroke: var(--wf-thread);
    animation-delay: 0.7s;
  }
  @keyframes wf-draw {
    to {
      stroke-dashoffset: 0;
    }
  }
  #sc-weft .wf-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }
  /* the install command: a pill you can copy */
  #sc-weft .wf-install {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 100%;
    padding: 0.4rem 0.4rem 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    font-size: 0.9375rem;
  }
  #sc-weft[data-look='blueprint'] .wf-install {
    border-radius: 0;
  }
  #sc-weft .wf-install code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #sc-weft .wf-install code::before {
    content: '$ ';
    color: var(--muted-foreground);
  }
  /* the sticky note: pinned at a slant, saying the one thing people do not believe */
  #sc-weft .wf-note {
    position: absolute;
    inset-block-start: clamp(7rem, 16vw, 10rem);
    inset-inline-end: max(clamp(1rem, 4vw, 2.5rem), calc((100% - 78rem) / 2));
    max-width: 14rem;
    padding: 1rem 1.1rem 1.2rem;
    rotate: 4deg;
    background: var(--wf-note);
    color: var(--wf-note-ink);
    box-shadow: 0 0.75rem 1.5rem -0.75rem oklch(0 0 0 / 0.35);
    font:
      600 1rem/1.35 'Bricolage Grotesque',
      sans-serif;
  }
  #sc-weft .wf-note::before {
    content: '';
    position: absolute;
    inset-block-start: -0.6rem;
    inset-inline-start: 40%;
    width: 4.5rem;
    height: 1.2rem;
    rotate: -6deg;
    background: oklch(1 0 0 / 0.55);
    box-shadow: 0 1px 2px oklch(0 0 0 / 0.15);
  }
  #sc-weft .wf-note small {
    display: block;
    margin-top: 0.4rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
  }
  #sc-weft .wf-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted-foreground);
    font-size: 0.9375rem;
  }
  #sc-weft .wf-facts b {
    color: var(--foreground);
    font-variant-numeric: tabular-nums;
  }
  /* the shapes: a cube, an orb, a prism and a spark drifting in the hero's corner - the parts weft weaves together */
  #sc-weft .wf-shapes {
    position: absolute;
    inset-block-end: clamp(2.5rem, 6vw, 4.5rem);
    inset-inline-end: max(clamp(1rem, 4vw, 2.5rem), calc((100% - 78rem) / 2));
    width: 17rem;
    height: 15rem;
    pointer-events: none;
  }
  #sc-weft .wf-shape {
    position: absolute;
    display: block;
    animation: wf-float 7s ease-in-out infinite alternate;
  }
  #sc-weft .wf-shape[data-shape='cube'] {
    inset: 0 auto auto 2rem;
    width: 6.5rem;
    aspect-ratio: 1 / 1.15;
    background-color: var(--primary);
  }
  #sc-weft .wf-shape[data-shape='orb'] {
    inset: 5.5rem 0 auto auto;
    width: 5.5rem;
    aspect-ratio: 1;
    background-color: var(--wf-thread);
    animation-delay: -2s;
    animation-duration: 8s;
  }
  #sc-weft .wf-shape[data-shape='hex'] {
    inset: auto auto 0 6.5rem;
    width: 5rem;
    aspect-ratio: 1.15;
    background-color: var(--wf-note);
    rotate: 12deg;
    animation-delay: -4s;
    animation-duration: 9s;
  }
  #sc-weft .wf-shape[data-shape='spark'] {
    inset: 1rem 2rem auto auto;
    width: 2.25rem;
    aspect-ratio: 1;
    background-color: var(--wf-ink);
    animation-name: wf-twinkle;
    animation-duration: 3s;
  }
  @keyframes wf-float {
    to {
      translate: 0 -0.9rem;
      rotate: 6deg;
    }
  }
  @keyframes wf-twinkle {
    to {
      scale: 0.6;
      rotate: 45deg;
    }
  }
  /* the logos: a heading over the teams who ship on it, rolling */
  #sc-weft .mk-logos {
    display: grid;
    gap: 1.5rem;
    padding-block: clamp(2.5rem, 6vw, 4rem);
    padding-inline: max(clamp(1rem, 4vw, 2.5rem), calc((100% - 78rem) / 2));
    border-block: 1px solid var(--border);
    color: var(--muted-foreground);
  }
  #sc-weft .wf-logos-head {
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    text-align: center;
  }
  #sc-weft .wf-logos-head h2 {
    margin: 0;
    color: var(--foreground);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
  }
  #sc-weft .mk-logo {
    color: inherit;
  }
  #sc-weft .mk-logo-name {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
  }
  /* section heads */
  #sc-weft .mk-section-header {
    margin-block-end: clamp(2rem, 4vw, 3rem);
  }
  #sc-weft .mk-section-header-eyebrow {
    color: var(--wf-ink);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
  }
  #sc-weft .mk-section-header-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
  }
  /* what it does: a bento of tiles, each with its own proof */
  #sc-weft .wf-bento {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  #sc-weft .wf-tile {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 15rem;
    overflow: hidden;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--card);
    color: var(--card-foreground);
  }
  #sc-weft .wf-tile[data-span='4'] {
    grid-column: span 4;
  }
  #sc-weft .wf-tile[data-span='3'] {
    grid-column: span 3;
  }
  #sc-weft .wf-tile[data-span='2'] {
    grid-column: span 2;
  }
  #sc-weft .wf-tile h3 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  #sc-weft .wf-tile p {
    margin: 0;
    max-width: 32rem;
    color: var(--muted-foreground);
    line-height: 1.5;
  }
  #sc-weft .wf-tile .mockup-code {
    margin-top: auto;
  }
  /* the split: a rule beside each line says which side it runs on, a sticker on the window says where it is cut */
  #sc-weft .wf-code-wrap {
    position: relative;
    margin-top: auto;
    padding-top: 0.5rem;
  }
  #sc-weft [data-wf-side='server'] {
    box-shadow: inset 3px 0 0 var(--wf-thread);
  }
  #sc-weft [data-wf-side='client'] {
    box-shadow: inset 3px 0 0 var(--primary);
  }
  #sc-weft .wf-split {
    position: absolute;
    inset-block-start: -0.35rem;
    inset-inline-end: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    rotate: 3deg;
    border-radius: 999px;
    background: var(--foreground);
    color: var(--background);
    font:
      600 0.8125rem/1.2 'JetBrains Mono',
      monospace;
  }
  #sc-weft .wf-split svg {
    width: 0.9rem;
    height: 0.9rem;
    color: var(--wf-thread);
  }
  .dark #sc-weft[data-look='blueprint'] .wf-split svg {
    color: var(--primary);
  }
  #sc-weft .wf-tile > .shader {
    opacity: 0.7;
  }
  #sc-weft .wf-tile[data-tile='islands'] {
    justify-content: flex-end;
  }
  #sc-weft .wf-tile[data-tile='islands']::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, var(--card) 35%, transparent 85%);
  }
  #sc-weft .wf-tile[data-tile='config'] {
    background-color: var(--muted);
  }
  #sc-weft .wf-badge-shape {
    display: grid;
    place-items: center;
    width: 3.25rem;
    aspect-ratio: 1;
    background: var(--primary);
    color: var(--primary-foreground);
  }
  /* the size: a starburst sticker with the number */
  #sc-weft .wf-burst {
    position: absolute;
    inset-block-start: 1rem;
    inset-inline-end: 1rem;
    display: grid;
    place-content: center;
    width: 6.5rem;
    aspect-ratio: 1;
    rotate: -10deg;
    background: var(--wf-thread);
    color: oklch(0.99 0 0);
    text-align: center;
    font:
      800 1.25rem/1 'Bricolage Grotesque',
      sans-serif;
  }
  #sc-weft[data-look='blueprint'] .wf-burst {
    color: oklch(0.3 0.1 258);
  }
  #sc-weft .wf-tile:has(.wf-burst) :is(h3, p:not([style])) {
    margin-inline-end: 6.5rem;
  }
  #sc-weft .wf-burst small {
    font-size: 0.6875rem;
    font-weight: 500;
  }
  #sc-weft .wf-routes {
    display: grid;
    gap: 0.25rem;
    margin: auto 0 0;
    padding: 0;
    list-style: none;
    font:
      0.875rem/1.5 'JetBrains Mono',
      monospace;
  }
  #sc-weft .wf-routes li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--muted);
  }
  #sc-weft .wf-routes span {
    color: var(--muted-foreground);
  }
  /* hot reload: the number circled by hand */
  #sc-weft .wf-hmr {
    margin-top: auto;
    color: var(--foreground);
    font:
      800 clamp(3rem, 7vw, 4.5rem) / 1 'Bricolage Grotesque',
      sans-serif;
    letter-spacing: -0.04em;
  }
  #sc-weft .wf-circled {
    position: relative;
    display: inline-block;
    padding-inline: 0.15em;
  }
  #sc-weft .wf-circled svg {
    position: absolute;
    inset: -18% -12%;
    width: 124%;
    height: 136%;
    overflow: visible;
    pointer-events: none;
  }
  #sc-weft .wf-circled path {
    fill: none;
    stroke: var(--wf-thread);
    stroke-width: 3;
    stroke-linecap: round;
  }
  /* the code and the terminal side by side */
  #sc-weft .wf-try {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
  }
  #sc-weft .wf-try .tabs {
    min-width: 0;
  }
  #sc-weft .mockup-code pre {
    white-space: pre-wrap;
  }
  /* the terminal in a ring of light (a Shader on its edge) with a tag that says it is live */
  #sc-weft .wf-shell-frame {
    position: relative;
    isolation: isolate;
    border-radius: var(--radius-xl);
    --shader-glow: 0.9rem;
  }
  #sc-weft .wf-shell {
    --terminal-background: oklch(0.17 0.03 275);
    min-width: 0;
    box-shadow: 0 1.5rem 3rem -1.5rem oklch(0 0 0 / 0.5);
  }
  #sc-weft .wf-live {
    position: absolute;
    inset-block-start: 0.55rem;
    inset-inline-end: -0.6rem;
    z-index: 1;
    padding: 0.2rem 0.75rem 0.2rem 1.5rem;
    rotate: 4deg;
    background: var(--wf-note);
    color: var(--wf-note-ink);
    font:
      700 0.75rem/1.3 'JetBrains Mono',
      monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  #sc-weft .wf-hint {
    margin: 0.75rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
  }
  /* the numbers: bars that draw themselves when they come into view */
  #sc-weft .wf-bench {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
  /* the stamp: inked on the chart's corner, half off the card */
  #sc-weft .wf-stamp {
    position: absolute;
    inset-block-start: -1.6rem;
    inset-inline-end: -0.9rem;
    display: grid;
    place-content: center;
    width: 5.5rem;
    aspect-ratio: 1;
    rotate: 12deg;
    border: 2px dashed currentColor;
    border-radius: 50%;
    outline: 3px solid currentColor;
    outline-offset: 3px;
    background: var(--background);
    color: var(--wf-ink);
    text-align: center;
    font:
      800 1.6rem/1 'Bricolage Grotesque',
      sans-serif;
  }
  #sc-weft .wf-stamp small {
    max-width: 4.5rem;
    margin-top: 0.15rem;
    font:
      600 0.5625rem/1.15 'JetBrains Mono',
      monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  #sc-weft .wf-chart:has(.wf-stamp) figcaption {
    margin-inline-end: 4.5rem;
  }
  #sc-weft .wf-chart {
    position: relative;
    margin: 0;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--card);
  }
  #sc-weft .wf-chart figcaption {
    margin-block-end: 1.25rem;
  }
  #sc-weft .wf-chart figcaption b {
    display: block;
    font:
      700 1.125rem/1.2 'Bricolage Grotesque',
      sans-serif;
  }
  #sc-weft .wf-chart figcaption span {
    color: var(--muted-foreground);
    font-size: 0.875rem;
  }
  #sc-weft .wf-bars {
    display: grid;
    gap: 0.85rem;
    margin: 0;
  }
  #sc-weft .wf-bars div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 0.75rem;
  }
  #sc-weft .wf-bars dt {
    font-size: 0.875rem;
  }
  #sc-weft .wf-bars dd {
    display: contents;
  }
  #sc-weft .wf-bars dd span {
    font:
      600 0.875rem 'JetBrains Mono',
      monospace;
    font-variant-numeric: tabular-nums;
  }
  #sc-weft .wf-bars i {
    grid-column: 1 / -1;
    display: block;
    width: calc(var(--v) * 1%);
    height: 0.6rem;
    border-radius: 999px;
    background: var(--muted-foreground);
    opacity: 0.45;
  }
  #sc-weft .wf-bars [data-ours] i {
    background: linear-gradient(90deg, var(--primary), var(--wf-thread));
    opacity: 1;
  }
  #sc-weft .wf-bars [data-ours] dt {
    font-weight: 600;
  }
  #sc-weft .wf-footnote {
    margin: 1.25rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
  }
  /* the voices: speech bubbles, one pinned askew */
  #sc-weft .wf-voices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  #sc-weft .wf-voice {
    display: grid;
    gap: 1rem;
    align-content: start;
  }
  #sc-weft .wf-voice blockquote {
    position: relative;
    margin: 0;
    padding: 1.25rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--card);
    font-size: 1.0625rem;
    line-height: 1.5;
  }
  #sc-weft .wf-voice blockquote::after {
    content: '';
    position: absolute;
    inset-block-end: -0.55rem;
    inset-inline-start: 1.75rem;
    width: 1rem;
    height: 1rem;
    rotate: 45deg;
    border: inherit;
    border-block-start: 0;
    border-inline-start: 0;
    background: inherit;
  }
  #sc-weft .wf-voice:nth-child(2) blockquote {
    rotate: -1.5deg;
    background: var(--wf-note);
    color: var(--wf-note-ink);
  }
  #sc-weft .wf-voice figcaption {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-inline-start: 0.75rem;
    font-size: 0.9375rem;
  }
  #sc-weft .wf-voice img {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    object-fit: cover;
  }
  #sc-weft .wf-voice figcaption span {
    display: block;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
  }
  /* the adapters */
  #sc-weft .wf-adapters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1rem;
  }
  #sc-weft .mk-integration-item {
    border-color: var(--border);
    background: var(--card);
  }
  #sc-weft .mk-integration-item-logo {
    font-family: 'JetBrains Mono', monospace;
  }
  /* the deploy band: contour lines drifting under the adapters */
  #sc-weft .wf-contours {
    opacity: 0.35;
  }
  /* the releases: a Timeline (newest first, the planned one a ring), the upgrade beside it with its stamp */
  #sc-weft .wf-release-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(2rem, 5vw, 4rem);
  }
  #sc-weft .wf-timeline .timeline-dot:has(> svg) {
    width: 2.25rem;
    height: 2.25rem;
    margin-top: -0.35rem;
  }
  #sc-weft .wf-timeline .timeline-dot > svg {
    width: 1.05rem;
    height: 1.05rem;
  }
  #sc-weft .wf-timeline .timeline-item:has(> .timeline-dot > svg)::before {
    left: calc(1.125rem - 1px);
    top: 2.4rem;
    width: 2px;
  }
  /* the line from the current release down is the thread itself */
  #sc-weft .wf-timeline .timeline-item:has(> .timeline-dot > svg):is([data-wf-current], [data-wf-current] ~ *)::before {
    background: linear-gradient(var(--primary), var(--wf-thread));
  }
  #sc-weft .wf-timeline .timeline-dot[data-variant='active'] {
    box-shadow: 0 0 0 0.35rem color-mix(in oklch, var(--primary) 18%, transparent);
  }
  #sc-weft .wf-timeline .timeline-dot[data-variant='outline'] {
    box-shadow: inset 0 0 0 2px var(--primary);
    border-radius: 50%;
    background-color: var(--background);
    color: var(--wf-ink);
  }
  #sc-weft .wf-timeline .timeline-content {
    gap: 0.4rem;
  }
  #sc-weft .wf-timeline .timeline-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    font:
      700 1.3rem/1.2 'Bricolage Grotesque',
      sans-serif;
    letter-spacing: -0.01em;
  }
  #sc-weft .wf-version {
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--foreground);
    color: var(--background);
    font:
      600 0.8125rem/1.4 'JetBrains Mono',
      monospace;
  }
  #sc-weft [data-wf-current] .wf-version {
    background: var(--primary);
    color: var(--primary-foreground);
  }
  #sc-weft [data-wf-planned] .wf-version {
    border: 1px dashed currentColor;
    background: none;
    color: var(--wf-ink);
  }
  #sc-weft .wf-timeline .timeline-description {
    max-width: 38rem;
    font-size: 0.9875rem;
  }
  #sc-weft .wf-timeline .timeline-time {
    font:
      0.8125rem/1.4 'JetBrains Mono',
      monospace;
  }
  #sc-weft .wf-changes {
    display: grid;
    gap: 0.6rem;
    margin: 0.35rem 0 0.25rem;
    padding: 1rem 1.15rem;
    list-style: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    font-size: 0.9375rem;
    line-height: 1.5;
  }
  #sc-weft .wf-changes li {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    align-items: baseline;
    gap: 0.75rem;
  }
  #sc-weft .wf-changes .badge {
    justify-content: center;
  }
  #sc-weft .wf-upgrade {
    position: relative;
    display: grid;
    gap: 0.9rem;
    padding: 1.75rem 1.5rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--muted);
  }
  #sc-weft .wf-upgrade h3 {
    margin: 0;
    margin-inline-end: 4rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
  }
  #sc-weft .wf-upgrade p {
    margin: 0;
    color: var(--muted-foreground);
    line-height: 1.5;
  }
  #sc-weft .wf-upgrade .wf-stamp {
    font-size: 2.25rem;
  }
  /* the closing call: a slanted band of thread */
  #sc-weft .wf-closing {
    display: grid;
    justify-items: center;
    gap: 1.25rem;
    overflow: clip;
    text-align: center;
    background: var(--foreground);
    color: var(--background);
  }
  /* a woven floor runs to the horizon under the call, faded where the words sit */
  #sc-weft .wf-weave {
    opacity: 0.35;
    mask-image: linear-gradient(to bottom, transparent 25%, black 90%);
  }
  #sc-weft .wf-closing h2 {
    margin: 0;
    font-size: clamp(2.25rem, 6vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1;
  }
  #sc-weft .wf-closing p {
    max-width: 34rem;
    margin: 0;
    opacity: 0.85;
  }
  #sc-weft .wf-closing .wf-install {
    border-color: color-mix(in oklch, var(--background) 30%, transparent);
    background: color-mix(in oklch, var(--background) 8%, var(--foreground));
  }
  #sc-weft .wf-closing .wf-install code::before {
    color: inherit;
    opacity: 0.6;
  }
  #sc-weft .wf-closing .btn[data-variant='ghost'] {
    color: inherit;
  }
  #sc-weft .wf-closing .btn[data-variant='ghost']:is(:hover, :focus-visible) {
    background: color-mix(in oklch, var(--background) 14%, var(--foreground));
  }
  /* the Site Footer: the docs, the community, the project and the legal notes */
  #sc-weft .mk-footer {
    background: none;
    color: inherit;
  }
  #sc-weft .mk-footer-inner {
    max-width: none;
    padding: clamp(2.5rem, 6vw, 4rem) max(clamp(1rem, 4vw, 2.5rem), calc((100% - 78rem) / 2)) 2rem;
  }
  #sc-weft .mk-footer-heading {
    color: inherit;
    font:
      600 0.75rem/1.3 'JetBrains Mono',
      monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  #sc-weft .mk-footer-list :is(a, button) {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
  }
  #sc-weft .mk-footer-list :is(a, button):is(:hover, :focus-visible) {
    text-decoration: underline;
    text-decoration-color: var(--primary);
    text-decoration-thickness: 0.15em;
    text-underline-offset: 0.25em;
  }
  #sc-weft .mk-footer-rule {
    margin: 0;
    background: var(--border);
  }
  #sc-weft .mk-footer-copy {
    color: var(--muted-foreground);
  }
  /* the dialogs: start a project, and the legal notes */
  #sc-weft .sc-dialog {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--card-foreground);
  }
  #sc-weft .sc-dialog .dialog-title {
    font:
      800 1.6rem/1.1 'Bricolage Grotesque',
      sans-serif;
    letter-spacing: -0.02em;
  }
  #sc-weft .sc-dialog .dialog-description {
    color: var(--muted-foreground);
  }
  #sc-weft :is(.sc-form, .sc-done) {
    display: grid;
    gap: 1rem;
  }
  #sc-weft .sc-row {
    display: grid;
    gap: 0.4rem;
  }
  #sc-weft .sc-choice {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    border: 0;
  }
  #sc-weft .sc-choice legend {
    margin-block-end: 0.5rem;
  }
  #sc-weft .sc-choice label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
  }
  #sc-weft .sc-choice label:has(:checked) {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
  }
  #sc-weft .sc-choice input {
    accent-color: var(--primary);
  }
  #sc-weft .wf-command {
    display: block;
    overflow-wrap: anywhere;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--wf-code);
    color: oklch(0.95 0.02 275);
    font:
      0.875rem/1.5 'JetBrains Mono',
      monospace;
  }
  #sc-weft .sc-dialog:not([data-sent]) .sc-done,
  #sc-weft .sc-dialog[data-sent] .sc-form {
    display: none;
  }
  #sc-weft .sc-legal {
    display: grid;
    gap: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.55;
  }
  #sc-weft .sc-legal :is(p, address) {
    margin: 0;
    font-style: normal;
  }
  #sc-weft .sc-legal a {
    color: inherit;
  }
  @container sc-weft (max-width: 60rem) {
    #sc-weft .wf-bento {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #sc-weft .wf-tile:is([data-span='4'], [data-span='3'], [data-span='2']) {
      grid-column: span 1;
    }
    #sc-weft .wf-tile[data-span='4'] {
      grid-column: 1 / -1;
    }
    #sc-weft :is(.wf-try, .wf-bench, .wf-voices, .wf-release-grid) {
      grid-template-columns: minmax(0, 1fr);
    }
    #sc-weft .wf-note {
      position: relative;
      inset: auto;
      justify-self: start;
      margin-block-start: 2.75rem;
      rotate: -2deg;
    }
    #sc-weft .wf-hero {
      padding-block-end: clamp(2.5rem, 6vw, 3.5rem);
    }
    #sc-weft .wf-shapes {
      display: none;
    }
  }
  @container sc-weft (max-width: 40rem) {
    #sc-weft .wf-live {
      inset-inline-end: 0.5rem;
    }
    #sc-weft .wf-bento {
      grid-template-columns: minmax(0, 1fr);
    }
    #sc-weft .wf-tile[data-span] {
      grid-column: auto;
    }
    #sc-weft .mk-header-nav {
      order: 3;
      width: 100%;
      margin-inline-start: -0.75rem;
    }
    #sc-weft .mk-header-actions {
      margin-inline-start: auto;
    }
    #sc-weft .wf-stars {
      display: none;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    #sc-weft .wf-thread path {
      animation: none;
      stroke-dashoffset: 0;
    }
    #sc-weft .wf-shape {
      animation: none;
    }
  }
  /* light or dark: the Swap writes the page's dark class - every look has a light and a dark palette */
  #sc-weft .site-mode {
    flex: none;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--background);
    color: var(--foreground);
  }
  #sc-weft .site-mode:hover {
    background: var(--accent);
    color: var(--accent-foreground);
  }
  /* -- modes: each look in light and dark, derived from the palettes above (the other mode of each look) -- */
  .dark #sc-weft[data-look='loom'] {
    color-scheme: dark;
    --background: oklch(0.17 0.02 275);
    --foreground: oklch(0.95 0.012 85);
    --card: oklch(0.205 0.025 275);
    --card-foreground: oklch(0.95 0.012 85);
    --popover: oklch(0.205 0.025 275);
    --popover-foreground: oklch(0.95 0.012 85);
    --muted: oklch(0.225 0.025 275);
    --muted-foreground: oklch(0.76 0.025 275);
    --border: oklch(0.95 0.012 85 / 0.13);
    --input: oklch(0.95 0.012 85 / 0.2);
    --primary: oklch(0.72 0.15 275);
    --primary-foreground: oklch(0.17 0.03 275);
    --secondary: oklch(0.25 0.03 275);
    --secondary-foreground: oklch(0.95 0.012 85);
    --accent: oklch(0.27 0.045 275);
    --accent-foreground: oklch(0.95 0.012 85);
    --ring: oklch(0.72 0.15 275);
    --wf-thread: oklch(0.7 0.18 35);
    --wf-ink: oklch(0.76 0.14 275);
    --wf-note: oklch(0.86 0.12 95);
    --wf-note-ink: oklch(0.22 0.04 80);
    --wf-code: oklch(0.13 0.025 275);
  }
  :root:not(.dark) #sc-weft[data-look='neon'] {
    color-scheme: light;
    --background: oklch(0.985 0.01 280);
    --foreground: oklch(0.2 0.04 280);
    --card: oklch(0.998 0.005 280);
    --card-foreground: oklch(0.2 0.04 280);
    --popover: oklch(0.998 0.005 280);
    --popover-foreground: oklch(0.2 0.04 280);
    --muted: oklch(0.95 0.015 280);
    --muted-foreground: oklch(0.45 0.04 280);
    --border: oklch(0.2 0.04 280 / 0.13);
    --input: oklch(0.2 0.04 280 / 0.2);
    --primary: oklch(0.52 0.12 210);
    --primary-foreground: oklch(0.99 0.01 210);
    --secondary: oklch(0.95 0.02 280);
    --secondary-foreground: oklch(0.2 0.04 280);
    --accent: oklch(0.94 0.03 300);
    --accent-foreground: oklch(0.2 0.04 280);
    --ring: oklch(0.52 0.12 210);
    --wf-thread: oklch(0.6 0.24 340);
    --wf-ink: oklch(0.5 0.13 210);
    --wf-note: oklch(0.6 0.24 340);
    --wf-note-ink: oklch(0.99 0.01 340);
    --wf-code: oklch(0.18 0.04 280);
  }
  :root:not(.dark) #sc-weft[data-look='blueprint'] {
    color-scheme: light;
    --background: oklch(0.97 0.012 250);
    --foreground: oklch(0.3 0.12 258);
    --card: oklch(0.995 0.005 250);
    --card-foreground: oklch(0.3 0.12 258);
    --popover: oklch(0.995 0.005 250);
    --popover-foreground: oklch(0.3 0.12 258);
    --muted: oklch(0.93 0.025 250);
    --muted-foreground: oklch(0.42 0.1 258);
    --border: oklch(0.3 0.12 258 / 0.35);
    --input: oklch(0.3 0.12 258 / 0.45);
    --primary: oklch(0.38 0.14 258);
    --primary-foreground: oklch(0.98 0.01 250);
    --secondary: oklch(0.93 0.03 250);
    --secondary-foreground: oklch(0.3 0.12 258);
    --accent: oklch(0.92 0.035 250);
    --accent-foreground: oklch(0.3 0.12 258);
    --ring: oklch(0.38 0.14 258);
    --wf-thread: oklch(0.6 0.19 30);
    --wf-ink: oklch(0.38 0.14 258);
    --wf-note: oklch(0.92 0.13 98);
    --wf-note-ink: oklch(0.3 0.1 258);
    --wf-code: oklch(0.3 0.11 258);
  }
  :root:not(.dark) #sc-weft[data-look='blueprint'] .wf-grid {
    color: oklch(0.38 0.14 258 / 0.12);
  }
  /* -- modes: end -- */
</style>
<div id="sc-weft" data-look="loom">
  <div class="wf-grid pattern-blueprint" data-for="blueprint" aria-hidden="true"></div>
  <header class="mk-header">
    <div class="mk-header-inner">
      <a class="mk-header-brand" href="#sc-weft"
        ><span class="wf-mark corner-squircle" aria-hidden="true"></span><span class="mk-header-name">weft</span></a
      >
      <nav class="mk-header-nav" aria-label="Site">
        <ul class="nav-menu-list">
          <li class="nav-menu-item"><a class="nav-menu-link" href="#wf-why">Why weft</a></li>
          <li class="nav-menu-item"><a class="nav-menu-link" href="#wf-code">Try it</a></li>
          <li class="nav-menu-item"><a class="nav-menu-link" href="#wf-speed">Benchmarks</a></li>
          <li class="nav-menu-item"><a class="nav-menu-link" href="#wf-adapters">Deploy</a></li>
          <li class="nav-menu-item"><a class="nav-menu-link" href="#wf-release">Changelog</a></li>
        </ul>
      </nav>
      <div class="mk-header-actions">
        <a
          class="btn wf-stars"
          data-variant="ghost"
          data-size="sm"
          href="https://github.com/"
          target="_blank"
          rel="noopener"
          aria-label="Weft on GitHub, 48,200 stars"
          ><i data-lucide="star"></i> 48.2k</a
        >
        <select class="select" data-size="sm" data-site-look aria-label="Look" style="width: auto">
          <option value="loom">Loom</option>
          <option value="neon">Neon</option>
          <option value="blueprint">Blueprint</option>
        </select>
        <label class="swap site-mode" data-variant="rotate" data-size="sm">
          <input type="checkbox" data-site-mode aria-label="Dark mode" />
          <span class="swap-on" aria-hidden="true"><i data-lucide="moon"></i></span>
          <span class="swap-off" aria-hidden="true"><i data-lucide="sun"></i></span>
        </label>
      </div>
    </div>
  </header>
  <main>
    <section class="wf-band wf-hero" aria-labelledby="wf-title">
      <div
        class="shader"
        data-variant="background"
        data-effect="warp"
        data-colors="var(--background) var(--primary) var(--wf-thread) var(--background)"
        data-speed="0.3"
        data-fps="30"
        data-look-set='{"default": {"data-warp": "1"}, "blueprint": {"data-warp": "0.6"}}'
        aria-hidden="true"
      ></div>
      <div class="wf-hero-copy">
        <a class="wf-release clip-tag" href="#wf-release" data-df-entrance="left"
          ><i data-lucide="sparkles"></i> 4.2 - islands that stream</a
        >
        <h1 id="wf-title" data-df-entrance="up">
          Weave
          <span class="text-rotate"
            ><span><span>apps</span><span>APIs</span><span>sites</span><span>edge workers</span></span></span
          ><br />
          from one thread of TypeScript.
        </h1>
        <svg class="wf-thread" viewBox="0 0 540 28" preserveAspectRatio="none" aria-hidden="true">
          <path pathLength="1" d="M2 14 C 47 -4, 92 32, 137 14 S 227 -4, 272 14 S 362 32, 407 14 S 497 -4, 538 14" />
          <path pathLength="1" d="M2 14 C 47 32, 92 -4, 137 14 S 227 32, 272 14 S 362 -4, 407 14 S 497 32, 538 14" />
        </svg>
        <p class="wf-lede" data-df-entrance="fade" style="--df-motion-delay: 150ms"
          >Server and client live in the same file; weft splits them at build time and sends the browser only what it
          runs. No config file, no API layer to keep in sync, a 9.4 KB runtime.</p
        >
        <div class="wf-cta" data-df-entrance="fade" style="--df-motion-delay: 250ms">
          <span class="wf-install"
            ><code data-wf-install data-lang="bash">bun create weft@latest</code
            ><button
              class="btn"
              data-variant="ghost"
              data-size="sm"
              type="button"
              data-wf-copy
              aria-label="Copy the command"
              ><i data-lucide="copy"></i> <span data-wf-copy-label aria-live="polite">Copy</span></button
            ></span
          >
          <button class="btn" data-size="lg" type="button" commandfor="wf-start" command="show-modal"
            >Start a project <i data-lucide="arrow-right"></i
          ></button>
          <a class="btn" data-variant="outline" data-size="lg" href="#wf-code">Try it here</a>
        </div>
        <ul class="wf-facts">
          <li><b>MIT</b> licensed</li>
          <li><b>1,240</b> contributors</li>
          <li><b>2.1M</b> installs a week</li>
        </ul>
      </div>
      <p class="wf-note corner-sketch" data-df-entrance="pop" style="--df-motion-delay: 600ms"
        >No config file. Really.<small>weft.config.ts is optional - most apps never write one.</small></p
      >
      <div class="wf-shapes" aria-hidden="true">
        <span class="wf-shape clip-cube" data-shape="cube"></span>
        <span class="wf-shape clip-sphere" data-shape="orb"></span>
        <span class="wf-shape clip-hexagon-3d" data-shape="hex"></span>
        <span class="wf-shape clip-star-4" data-shape="spark"></span>
      </div>
    </section>
    <section class="mk-logos" aria-labelledby="wf-logos-title">
      <header class="wf-logos-head">
        <span class="mk-section-header-eyebrow">// trusted by</span>
        <h2 id="wf-logos-title">Teams who ship on weft</h2>
      </header>
      <div class="mk-logos-roll">
        <div class="mk-logos-roll-track">
          <span class="mk-logo"
            ><i data-lucide="hexagon" aria-hidden="true"></i><span class="mk-logo-name">Hexlane</span></span
          >
          <span class="mk-logo"
            ><i data-lucide="waves" aria-hidden="true"></i><span class="mk-logo-name">Tidewater</span></span
          >
          <span class="mk-logo"
            ><i data-lucide="bird" aria-hidden="true"></i><span class="mk-logo-name">Kestrel Bank</span></span
          >
          <span class="mk-logo"
            ><i data-lucide="mountain" aria-hidden="true"></i><span class="mk-logo-name">Northwind</span></span
          >
          <span class="mk-logo"
            ><i data-lucide="orbit" aria-hidden="true"></i><span class="mk-logo-name">Orbitly</span></span
          >
          <span class="mk-logo"
            ><i data-lucide="leaf" aria-hidden="true"></i><span class="mk-logo-name">Greenhouse</span></span
          >
          <span class="mk-logo" aria-hidden="true"
            ><i data-lucide="hexagon" aria-hidden="true"></i><span class="mk-logo-name">Hexlane</span></span
          >
          <span class="mk-logo" aria-hidden="true"
            ><i data-lucide="waves" aria-hidden="true"></i><span class="mk-logo-name">Tidewater</span></span
          >
          <span class="mk-logo" aria-hidden="true"
            ><i data-lucide="bird" aria-hidden="true"></i><span class="mk-logo-name">Kestrel Bank</span></span
          >
          <span class="mk-logo" aria-hidden="true"
            ><i data-lucide="mountain" aria-hidden="true"></i><span class="mk-logo-name">Northwind</span></span
          >
          <span class="mk-logo" aria-hidden="true"
            ><i data-lucide="orbit" aria-hidden="true"></i><span class="mk-logo-name">Orbitly</span></span
          >
          <span class="mk-logo" aria-hidden="true"
            ><i data-lucide="leaf" aria-hidden="true"></i><span class="mk-logo-name">Greenhouse</span></span
          >
        </div>
      </div>
    </section>
    <section id="wf-why" class="wf-band" data-tone="muted" aria-labelledby="wf-why-title">
      <header class="mk-section-header">
        <div class="mk-section-header-copy">
          <span class="mk-section-header-eyebrow">// why weft</span>
          <h2 class="mk-section-header-title" id="wf-why-title">One file, two runtimes, no glue.</h2>
          <p class="mk-section-header-desc"
            >Most of a web app is the code that moves data between a server and a browser. Weft writes that code for
            you.</p
          >
        </div>
      </header>
      <ul class="wf-bento" data-df-stagger>
        <li class="wf-tile" data-span="4" data-df-entrance="up">
          <h3>Server and client in the same file</h3>
          <p
            >A <code data-lang="ts">server()</code> function runs on the server, everywhere else runs in the browser -
            weft cuts the file in two and types the call between them.</p
          >
          <div class="wf-code-wrap">
            <div class="mockup-code" data-title="routes/todos.tsx" data-lang="tsx">
              <pre data-wf-side="server"><code>const add = server(async (text: string) =&gt; db.todos.insert({ text }));</code></pre>
              <pre><code> </code></pre>
              <pre data-wf-side="client"><code>export default function Todos() {</code></pre>
              <pre data-wf-side="client"><code>  return &lt;form action={add}&gt;&lt;input name="text" /&gt;&lt;/form&gt;;</code></pre>
              <pre data-wf-side="client"><code>}</code></pre>
            </div>
            <span class="wf-split shadow-sticker" aria-hidden="true"
              ><i data-lucide="scissors"></i> split at build</span
            >
          </div>
        </li>
        <li class="wf-tile" data-span="2" data-df-entrance="up">
          <span class="wf-burst clip-burst" aria-hidden="true">9.4 KB<small>min + br</small></span>
          <h3>A runtime you can read</h3>
          <p>The whole client runtime is 9.4 KB compressed - smaller than most hero images.</p>
          <p style="margin-top: auto"><a class="link" href="#wf-speed">See the numbers</a></p>
        </li>
        <li class="wf-tile" data-span="2" data-tile="islands" data-df-entrance="up">
          <div
            class="shader"
            data-variant="background"
            data-effect="dot-orbit"
            data-colors="var(--card) var(--primary) var(--wf-thread)"
            data-speed="0.4"
            data-fps="30"
            aria-hidden="true"
          ></div>
          <h3>Islands that stream</h3>
          <p
            >Each interactive part ships and wakes up on its own, as its data arrives - the page never waits for the
            slowest.</p
          >
        </li>
        <li class="wf-tile" data-span="2" data-df-entrance="up">
          <h3>Routes you can type</h3>
          <p>The file tree is the router; links are checked by the compiler.</p>
          <ul class="wf-routes">
            <li>/ <span>routes/index.tsx</span></li>
            <li>/todos <span>routes/todos.tsx</span></li>
            <li>/blog/:slug <span>routes/blog/[slug].tsx</span></li>
          </ul>
        </li>
        <li class="wf-tile" data-span="2" data-tile="config" data-df-entrance="up">
          <span class="wf-badge-shape clip-hexagon" aria-hidden="true"><i data-lucide="settings-2"></i></span>
          <h3>Zero config, all escape hatches</h3>
          <p
            >Sensible defaults for TypeScript, CSS, images and env vars. A config file when you need one - and only the
            line you change.</p
          >
        </li>
        <li class="wf-tile" data-span="3" data-df-entrance="up">
          <h3>Hot reload you do not notice</h3>
          <p>Save a file and the change is on screen before you look up - state kept.</p>
          <p class="wf-hmr"
            ><span class="wf-circled"
              >38 ms<svg viewBox="0 0 120 60" preserveAspectRatio="none" aria-hidden="true">
                <path d="M18 8 C 60 -2, 112 6, 114 30 S 70 60, 34 54 S 2 30, 10 16 S 40 4, 64 6" /></svg></span
          ></p>
        </li>
        <li class="wf-tile" data-span="3" data-df-entrance="up">
          <h3>Runs where you deploy</h3>
          <p>One build, many targets: Bun, Node, Deno, Cloudflare Workers or a folder of static files.</p>
          <p style="margin-top: auto"><a class="link" href="#wf-adapters">All adapters</a></p>
        </li>
      </ul>
    </section>
    <section id="wf-code" class="wf-band" aria-labelledby="wf-code-title">
      <header class="mk-section-header">
        <div class="mk-section-header-copy">
          <span class="mk-section-header-eyebrow">// try it</span>
          <h2 class="mk-section-header-title" id="wf-code-title">Read the code, then run it.</h2>
          <p class="mk-section-header-desc">Three files make an app. The terminal is real - type into it.</p>
        </div>
      </header>
      <div class="wf-try">
        <div class="tabs">
          <div class="tab-list" role="tablist" aria-label="Files">
            <button class="tab-trigger" role="tab" aria-selected="true" aria-controls="wf-tab-page" id="wf-t-page"
              >routes/index.tsx</button
            >
            <button
              class="tab-trigger"
              role="tab"
              aria-selected="false"
              aria-controls="wf-tab-data"
              id="wf-t-data"
              tabindex="-1"
              >server/db.ts</button
            >
            <button
              class="tab-trigger"
              role="tab"
              aria-selected="false"
              aria-controls="wf-tab-island"
              id="wf-t-island"
              tabindex="-1"
              >islands/Counter.tsx</button
            >
          </div>
          <div class="tab-content" role="tabpanel" id="wf-tab-page" aria-labelledby="wf-t-page" tabindex="0">
            <div class="mockup-code" data-title="routes/index.tsx" data-numbers data-lang="tsx">
              <pre><code>import { server } from 'weft';</code></pre>
              <pre><code>import { db } from '../server/db';</code></pre>
              <pre><code>import Counter from '../islands/Counter';</code></pre>
              <pre><code></code></pre>
              <pre><code>export const load = server(() =&gt; db.posts.latest(5));</code></pre>
              <pre><code></code></pre>
              <pre><code>export default function Home({ data }) {</code></pre>
              <pre><code>  return (</code></pre>
              <pre><code>    &lt;main&gt;</code></pre>
              <pre><code>      {data.map((p) =&gt; &lt;a href={`/blog/${p.slug}`}&gt;{p.title}&lt;/a&gt;)}</code></pre>
              <pre><code>      &lt;Counter start={3} /&gt;</code></pre>
              <pre><code>    &lt;/main&gt;</code></pre>
              <pre><code>  );</code></pre>
              <pre><code>}</code></pre>
            </div>
          </div>
          <div class="tab-content" role="tabpanel" id="wf-tab-data" aria-labelledby="wf-t-data" tabindex="0" hidden>
            <div class="mockup-code" data-title="server/db.ts" data-numbers data-lang="ts">
              <pre><code>import { sqlite } from 'weft/db';</code></pre>
              <pre><code></code></pre>
              <pre><code>// never sent to the browser - weft refuses to bundle it</code></pre>
              <pre><code>export const db = sqlite('app.db', {</code></pre>
              <pre><code>  posts: { slug: 'text', title: 'text', at: 'date' },</code></pre>
              <pre><code>});</code></pre>
            </div>
          </div>
          <div class="tab-content" role="tabpanel" id="wf-tab-island" aria-labelledby="wf-t-island" tabindex="0" hidden>
            <div class="mockup-code" data-title="islands/Counter.tsx" data-numbers data-lang="tsx">
              <pre><code>import { signal } from 'weft';</code></pre>
              <pre><code></code></pre>
              <pre><code>// an island: 0.6 KB of JavaScript, awake when it scrolls into view</code></pre>
              <pre><code>export default function Counter({ start }: { start: number }) {</code></pre>
              <pre><code>  const n = signal(start);</code></pre>
              <pre><code>  return &lt;button onClick={() =&gt; n.value++}&gt;{n}&lt;/button&gt;;</code></pre>
              <pre><code>}</code></pre>
            </div>
          </div>
        </div>
        <div>
          <div class="wf-shell-frame">
            <div
              class="shader"
              data-variant="border"
              data-effect="pulsing-border"
              data-spots="2"
              data-thickness="2"
              data-colors="var(--primary) var(--wf-thread) var(--wf-ink)"
              data-speed="0.4"
              data-fps="30"
              aria-hidden="true"
            ></div>
            <div
              class="terminal wf-shell"
              id="wf-shell"
              aria-label="A shell in a new weft project - type help"
              data-chrome="mac"
              data-title="~/hello - zsh"
              data-prompt="~/hello % "
              data-prompt-tone="success"
              data-rows="14"
              data-autoplay="600"
              data-speed="35"
            >
              <script type="application/json" class="terminal-script">
                [
                  {
                    "command": "bun create weft@latest hello",
                    "output": [
                      "◇ template  app",
                      "◇ language  TypeScript",
                      "✔ 3 files written, dependencies installed in 1.9 s"
                    ],
                    "tone": "success"
                  },
                  {
                    "command": "weft dev",
                    "output": ["weft 4.2.0  ready in 212 ms", "  ➜ local  http://localhost:5170/"]
                  },
                  { "output": "", "wait": 300 },
                  { "output": "Your turn - try weft routes, weft build or help.", "tone": "muted" }
                ]
              </script>
            </div>
            <span class="wf-live clip-tag" aria-hidden="true">live</span>
          </div>
          <p class="wf-hint"
            >Keys: <kbd class="kbd">↑</kbd> history, <kbd class="kbd">Tab</kbd> completes, <kbd class="kbd">Ctrl</kbd>
            <kbd class="kbd">L</kbd> clears.</p
          >
        </div>
      </div>
    </section>
    <section id="wf-speed" class="wf-band" data-tone="muted" aria-labelledby="wf-speed-title">
      <header class="mk-section-header">
        <div class="mk-section-header-copy">
          <span class="mk-section-header-eyebrow">// benchmarks</span>
          <h2 class="mk-section-header-title" id="wf-speed-title">Fast where your users feel it.</h2>
          <p class="mk-section-header-desc"
            >The same blog app, built three ways. Lower is better, except where it says otherwise.</p
          >
        </div>
      </header>
      <div class="wf-bench">
        <figure class="wf-chart">
          <span class="wf-stamp" aria-hidden="true">9×<small>less JavaScript</small></span>
          <figcaption><b>JavaScript sent</b><span>per page view, KB compressed</span></figcaption>
          <dl class="wf-bars" data-df-stagger>
            <div data-ours
              ><dt>weft 4.2</dt><dd><span>14</span><i style="--v: 11" data-df-entrance="wipe"></i></dd
            ></div>
            <div
              ><dt>weft 3</dt><dd><span>41</span><i style="--v: 33" data-df-entrance="wipe"></i></dd
            ></div>
            <div
              ><dt>a typical SPA</dt><dd><span>126</span><i style="--v: 100" data-df-entrance="wipe"></i></dd
            ></div>
          </dl>
        </figure>
        <figure class="wf-chart">
          <figcaption><b>Cold start</b><span>edge function, first request, ms</span></figcaption>
          <dl class="wf-bars" data-df-stagger>
            <div data-ours
              ><dt>weft 4.2</dt><dd><span>9</span><i style="--v: 15" data-df-entrance="wipe"></i></dd
            ></div>
            <div
              ><dt>weft 3</dt><dd><span>23</span><i style="--v: 38" data-df-entrance="wipe"></i></dd
            ></div>
            <div
              ><dt>a typical SSR server</dt><dd><span>61</span><i style="--v: 100" data-df-entrance="wipe"></i></dd
            ></div>
          </dl>
        </figure>
        <figure class="wf-chart">
          <figcaption><b>Throughput</b><span>requests a second, higher is better</span></figcaption>
          <dl class="wf-bars" data-df-stagger>
            <div data-ours
              ><dt>weft 4.2</dt><dd><span>52,400</span><i style="--v: 100" data-df-entrance="wipe"></i></dd
            ></div>
            <div
              ><dt>weft 3</dt><dd><span>38,900</span><i style="--v: 74" data-df-entrance="wipe"></i></dd
            ></div>
            <div
              ><dt>a typical SSR server</dt><dd><span>11,700</span><i style="--v: 22" data-df-entrance="wipe"></i></dd
            ></div>
          </dl>
        </figure>
      </div>
      <p class="wf-footnote"
        >weft-bench 2.3 · Apple M3 Pro, 64 connections, 30 s per run, median of five · the harness and the raw runs are
        in the repository.</p
      >
    </section>
    <section class="wf-band" aria-labelledby="wf-voices-title">
      <header class="mk-section-header">
        <div class="mk-section-header-copy">
          <span class="mk-section-header-eyebrow">// in production</span>
          <h2 class="mk-section-header-title" id="wf-voices-title">What teams deleted.</h2>
        </div>
      </header>
      <ul class="wf-voices">
        <li>
          <figure class="wf-voice" data-df-entrance="up">
            <blockquote
              >We deleted our whole API package - 4,000 lines of handlers and types that only existed to keep two
              codebases in sync.</blockquote
            >
            <figcaption
              ><img src="images/avatars/32-96.webp" alt="" /><b
                >Priya Raman<span>Staff engineer, Tidewater</span></b
              ></figcaption
            >
          </figure>
        </li>
        <li>
          <figure class="wf-voice" data-df-entrance="up" style="--df-motion-delay: 120ms">
            <blockquote
              >Our landing page went from 180 KB of JavaScript to 11. Same design, same team, one afternoon.</blockquote
            >
            <figcaption
              ><img src="images/avatars/12-96.webp" alt="" /><b
                >Jonas Weber<span>Frontend lead, Kestrel Bank</span></b
              ></figcaption
            >
          </figure>
        </li>
        <li>
          <figure class="wf-voice" data-df-entrance="up" style="--df-motion-delay: 240ms">
            <blockquote
              >The error messages tell you which file to open and which line to change. I read them instead of
              searching.</blockquote
            >
            <figcaption
              ><img src="images/avatars/47-96.webp" alt="" /><b
                >Ana Ferreira<span>Indie developer, Lisbon</span></b
              ></figcaption
            >
          </figure>
        </li>
      </ul>
    </section>
    <section id="wf-adapters" class="wf-band" data-tone="muted" aria-labelledby="wf-adapters-title">
      <div
        class="shader wf-contours"
        data-variant="background"
        data-effect="topography"
        data-colors="var(--primary) var(--wf-thread) var(--wf-ink)"
        data-background="var(--muted)"
        data-lines="9"
        data-speed="0.3"
        data-fps="30"
        aria-hidden="true"
      ></div>
      <header class="mk-section-header">
        <div class="mk-section-header-copy">
          <span class="mk-section-header-eyebrow">// deploy</span>
          <h2 class="mk-section-header-title" id="wf-adapters-title">One build, wherever you run.</h2>
          <p class="mk-section-header-desc">An adapter is one line in your package.json. Switch it and build again.</p>
        </div>
      </header>
      <div class="wf-adapters">
        <article class="mk-integration-item">
          <span class="mk-integration-item-logo" style="--mk-integration-color: #3b2d22" aria-hidden="true">Bn</span>
          <div class="mk-integration-item-body">
            <h3 class="mk-integration-item-name"
              >Bun <span class="badge" data-variant="secondary" data-size="sm">default</span></h3
            >
            <span class="mk-integration-item-category">Server</span>
            <p class="mk-integration-item-desc"
              >One binary with your app inside - <code data-lang="bash">weft build --compile</code>.</p
            >
          </div>
        </article>
        <article class="mk-integration-item">
          <span class="mk-integration-item-logo" style="--mk-integration-color: #2f6b2f" aria-hidden="true">Nd</span>
          <div class="mk-integration-item-body">
            <h3 class="mk-integration-item-name">Node</h3>
            <span class="mk-integration-item-category">Server</span>
            <p class="mk-integration-item-desc"
              >Node 20 and later, as a plain HTTP handler or behind your own server.</p
            >
          </div>
        </article>
        <article class="mk-integration-item">
          <span class="mk-integration-item-logo" style="--mk-integration-color: #1f1f1f" aria-hidden="true">Dn</span>
          <div class="mk-integration-item-body">
            <h3 class="mk-integration-item-name">Deno</h3>
            <span class="mk-integration-item-category">Server</span>
            <p class="mk-integration-item-desc">With permissions written for you: net, read and env, nothing else.</p>
          </div>
        </article>
        <article class="mk-integration-item">
          <span class="mk-integration-item-logo" style="--mk-integration-color: #b4541b" aria-hidden="true">CW</span>
          <div class="mk-integration-item-body">
            <h3 class="mk-integration-item-name"
              >Cloudflare Workers <span class="badge" data-variant="outline" data-size="sm">edge</span></h3
            >
            <span class="mk-integration-item-category">Edge</span>
            <p class="mk-integration-item-desc">Each route a function, the islands on the CDN.</p>
          </div>
        </article>
        <article class="mk-integration-item">
          <span class="mk-integration-item-logo" style="--mk-integration-color: #3d3a8c" aria-hidden="true">St</span>
          <div class="mk-integration-item-body">
            <h3 class="mk-integration-item-name">Static</h3>
            <span class="mk-integration-item-category">Files</span>
            <p class="mk-integration-item-desc">Prerenders every route it can and tells you which ones it could not.</p>
          </div>
        </article>
        <article class="mk-integration-item">
          <span class="mk-integration-item-logo" style="--mk-integration-color: #5c5c5c" aria-hidden="true">Dk</span>
          <div class="mk-integration-item-body">
            <h3 class="mk-integration-item-name">Docker</h3>
            <span class="mk-integration-item-category">Container</span>
            <p class="mk-integration-item-desc"
              >A 38 MB image from a Dockerfile weft writes - read it before you use it.</p
            >
          </div>
        </article>
      </div>
    </section>
    <section id="wf-release" class="wf-band" aria-labelledby="wf-release-title">
      <header class="mk-section-header">
        <div class="mk-section-header-copy">
          <span class="mk-section-header-eyebrow">// changelog</span>
          <h2 class="mk-section-header-title" id="wf-release-title">Four releases, nothing broke.</h2>
          <p class="mk-section-header-desc"
            >A minor release every quarter; an upgrade is one command and has needed no codemod since 4.0.</p
          >
        </div>
      </header>
      <div class="wf-release-grid">
        <ol class="timeline wf-timeline" data-density="spacious">
          <li class="timeline-item" data-wf-planned>
            <div class="timeline-dot" data-variant="outline"><i data-lucide="flask-conical"></i></div>
            <div class="timeline-content">
              <p class="timeline-title"><span class="wf-version">4.3</span> Partial prerendering</p>
              <p class="timeline-description"
                >A route's static shell comes from the CDN; its islands are filled in at the edge.</p
              >
              <time class="timeline-time" datetime="2026-12">December 2026 · in beta</time>
            </div>
          </li>
          <li class="timeline-item" data-wf-current>
            <div class="timeline-dot" data-variant="active"><i data-lucide="sparkles"></i></div>
            <div class="timeline-content">
              <p class="timeline-title"><span class="wf-version">4.2</span> Islands that stream</p>
              <ul class="wf-changes">
                <li
                  ><span class="badge" data-variant="default">feature</span> Islands wake in the order their data
                  arrives - the page never waits for the slowest query.</li
                >
                <li
                  ><span class="badge" data-variant="default">feature</span> Typed form actions: a form's fields are
                  checked against the server function it posts to.</li
                >
                <li
                  ><span class="badge" data-variant="secondary">speed</span> The dev server starts 40 % faster; the
                  module graph is cached between runs.</li
                >
                <li
                  ><span class="badge" data-variant="outline">fix</span> Source maps point at the line you wrote, not at
                  the split.</li
                >
              </ul>
              <time class="timeline-time" datetime="2026-11-04">4 November 2026 · latest</time>
            </div>
          </li>
          <li class="timeline-item">
            <div class="timeline-dot"><i data-lucide="route"></i></div>
            <div class="timeline-content">
              <p class="timeline-title"><span class="wf-version">4.1</span> Routes you can type</p>
              <p class="timeline-description"
                >Links are checked by the compiler: a renamed file fails the build, not your users.</p
              >
              <time class="timeline-time" datetime="2026-08-12">12 August 2026</time>
            </div>
          </li>
          <li class="timeline-item">
            <div class="timeline-dot"><i data-lucide="spline"></i></div>
            <div class="timeline-content">
              <p class="timeline-title"><span class="wf-version">4.0</span> One thread</p>
              <p class="timeline-description"
                ><code data-lang="ts">server()</code> functions live in the file that calls them; the API layer is
                gone.</p
              >
              <time class="timeline-time" datetime="2026-05-05">5 May 2026</time>
            </div>
          </li>
        </ol>
        <aside class="wf-upgrade" aria-labelledby="wf-upgrade-title">
          <span class="wf-stamp" aria-hidden="true">0<small>breaking changes</small></span>
          <h3 id="wf-upgrade-title">Upgrade in one line</h3>
          <p>The upgrade reads your lockfile, moves every weft package and runs the codemods a release needs.</p>
          <div class="mockup-code" data-title="~/hello" data-lang="bash">
            <pre data-prefix="$"><code>bunx weft upgrade</code></pre>
            <pre data-prefix="$"><code>weft build &amp;&amp; weft deploy</code></pre>
          </div>
          <a class="link" href="https://github.com/" target="_blank" rel="noopener">The full changelog on GitHub</a>
        </aside>
      </div>
    </section>
    <section class="wf-band wf-closing edge-slant-top" aria-labelledby="wf-closing-title">
      <div
        class="shader wf-weave"
        data-variant="background"
        data-effect="surface"
        data-pattern="weave"
        data-material="paper"
        data-projection="floor"
        data-motion="drift"
        data-scale="6"
        data-colors="var(--foreground) var(--primary) var(--wf-thread) var(--foreground)"
        data-speed="0.25"
        data-fps="30"
        aria-hidden="true"
      ></div>
      <h2 id="wf-closing-title" data-df-entrance="zoom">Pick up the thread.</h2>
      <p>One command makes a project. The tutorial takes twenty minutes and ends with an app on the internet.</p>
      <div class="wf-cta" style="justify-content: center">
        <span class="wf-install"
          ><code data-lang="bash">bun create weft@latest</code
          ><button
            class="btn"
            data-variant="ghost"
            data-size="sm"
            type="button"
            data-wf-copy
            aria-label="Copy the command"
            ><i data-lucide="copy"></i> <span data-wf-copy-label aria-live="polite">Copy</span></button
          ></span
        >
        <button class="btn" data-variant="ghost" data-size="lg" type="button" commandfor="wf-start" command="show-modal"
          >Start a project <i data-lucide="arrow-right"></i
        ></button>
      </div>
    </section>
  </main>
  <footer class="mk-footer">
    <div class="mk-footer-inner">
      <nav class="mk-footer-nav" aria-label="Footer">
        <div class="mk-footer-col">
          <h3 class="mk-footer-heading">Learn</h3>
          <ul class="mk-footer-list">
            <li><a href="#wf-why">Why weft</a></li>
            <li><a href="#wf-code">The three files</a></li>
            <li><button type="button" commandfor="wf-start" command="show-modal">Start a project</button></li>
          </ul>
        </div>
        <div class="mk-footer-col">
          <h3 class="mk-footer-heading">Ship</h3>
          <ul class="mk-footer-list">
            <li><a href="#wf-adapters">Adapters</a></li>
            <li><a href="#wf-speed">Benchmarks</a></li>
            <li><a href="#wf-release">Changelog</a></li>
          </ul>
        </div>
        <div class="mk-footer-col">
          <h3 class="mk-footer-heading">Community</h3>
          <ul class="mk-footer-list">
            <li><a href="https://github.com/" target="_blank" rel="noopener">GitHub</a></li>
            <li><a href="https://discord.com/" target="_blank" rel="noopener">Discord</a></li>
            <li><a href="mailto:hello@example.com">hello@example.com</a></li>
          </ul>
        </div>
        <div class="mk-footer-col">
          <h3 class="mk-footer-heading">Project</h3>
          <ul class="mk-footer-list">
            <li><a href="https://opensource.org/license/mit" target="_blank" rel="noopener">MIT license</a></li>
            <li><button type="button" commandfor="wf-imprint" command="show-modal">Imprint</button></li>
            <li><button type="button" commandfor="wf-privacy" command="show-modal">Privacy</button></li>
          </ul>
        </div>
      </nav>
      <hr class="separator mk-footer-rule" />
      <div class="mk-footer-bottom">
        <a class="mk-footer-brand" href="#sc-weft"
          ><span class="wf-mark corner-squircle" aria-hidden="true"></span
          ><span class="mk-footer-brand-name">weft</span></a
        >
        <div class="mk-footer-meta">
          <p class="mk-footer-copy">Made by 1,240 people and a foundation that pays the maintainers.</p>
        </div>
      </div>
    </div>
  </footer>
  <dialog class="dialog sc-dialog" id="wf-start" aria-labelledby="wf-start-title">
    <div class="dialog-content">
      <form class="sc-form" data-sc-form>
        <div class="dialog-header">
          <h2 class="dialog-title" id="wf-start-title">Start a project</h2>
          <p class="dialog-description">Pick a template; we write the command. Leave your email for the tutorial.</p>
        </div>
        <div class="sc-row">
          <label class="label" for="wf-name">Project name</label>
          <input
            class="input"
            id="wf-name"
            name="name"
            required
            pattern="[a-z0-9][a-z0-9-]*"
            placeholder="hello"
            title="Lowercase letters, digits and dashes"
          />
        </div>
        <fieldset class="sc-choice">
          <legend class="label">Template</legend>
          <label><input type="radio" name="template" value="app" checked /> App</label>
          <label><input type="radio" name="template" value="blog" /> Blog</label>
          <label><input type="radio" name="template" value="api" /> API only</label>
        </fieldset>
        <fieldset class="sc-choice">
          <legend class="label">Package manager</legend>
          <label><input type="radio" name="pm" value="bun" checked /> bun</label>
          <label><input type="radio" name="pm" value="npm" /> npm</label>
          <label><input type="radio" name="pm" value="pnpm" /> pnpm</label>
        </fieldset>
        <div class="sc-row">
          <label class="label" for="wf-mail">Email</label>
          <input class="input" id="wf-mail" name="email" type="email" autocomplete="email" required />
        </div>
        <div class="sc-row">
          <span class="label">Your command</span>
          <output class="wf-command" for="wf-name" data-wf-command data-lang="bash"
            >bun create weft@latest hello --template app</output
          >
        </div>
        <div class="dialog-footer">
          <button class="btn" data-variant="outline" type="button" commandfor="wf-start" command="close">Cancel</button>
          <button class="btn" type="submit">Send me the tutorial</button>
        </div>
      </form>
      <div class="sc-done" tabindex="-1">
        <h2 class="dialog-title">The tutorial is on its way</h2>
        <p class="dialog-description">Run this in a terminal while it arrives:</p>
        <output class="wf-command" data-wf-command-done data-lang="bash"></output>
        <div class="dialog-footer">
          <button class="btn" type="button" commandfor="wf-start" command="close">Close</button>
        </div>
      </div>
    </div>
  </dialog>
  <dialog class="dialog sc-dialog" id="wf-imprint" aria-labelledby="wf-imprint-title">
    <div class="dialog-content">
      <div class="dialog-header">
        <h2 class="dialog-title" id="wf-imprint-title">Imprint</h2>
        <p class="dialog-description">Who runs this site</p>
      </div>
      <div class="sc-legal">
        <address>Weft Foundation e.V.<br />Oranienstraße 12<br />Berlin, Germany</address>
        <p>Registered association, VR 00000 B · Board: Mira Okafor, Lukas Brandt</p>
        <p>Contact: <a href="mailto:hello@example.com">hello@example.com</a></p>
      </div>
      <div class="dialog-footer">
        <button class="btn" type="button" commandfor="wf-imprint" command="close">Close</button>
      </div>
    </div>
  </dialog>
  <dialog class="dialog sc-dialog" id="wf-privacy" aria-labelledby="wf-privacy-title">
    <div class="dialog-content">
      <div class="dialog-header">
        <h2 class="dialog-title" id="wf-privacy-title">Privacy</h2>
        <p class="dialog-description">What we keep, and why</p>
      </div>
      <div class="sc-legal">
        <p
          >This site sets no cookies and runs no trackers. The fonts come from Google Fonts; the photos are served with
          the site.</p
        >
        <p>For the tutorial we keep your email until you unsubscribe - one link at the foot of every mail.</p>
        <p>Questions or a request to delete: <a href="mailto:privacy@example.com">privacy@example.com</a></p>
      </div>
      <div class="dialog-footer">
        <button class="btn" type="button" commandfor="wf-privacy" command="close">Close</button>
      </div>
    </div>
  </dialog>
</div>
<script type="module">
  addEventListener('DOMContentLoaded', () => {
    const root = df$('#sc-weft').get(0);

    // code in syntax colours: Shiki (pinned, loaded on first use) tokenizes each element with data-lang - a Code
    // Mockup's lines, an install command, a command the form writes - in the light and the dark theme at once. A token
    // is a span carrying both colours; the listing's own ground (measured - the mockups stay dark in a light look)
    // picks one. Offline the code stays plain.
    const GROUND = document.createElement('canvas').getContext('2d', { willReadFrequently: true });
    const darkGround = (el) => {
      for (let node = el; node && node !== document.documentElement; node = node.parentElement) {
        const bg = getComputedStyle(node).backgroundColor;
        if (!bg || bg === 'transparent' || /,\s*0\)$|\/\s*0\)$/.test(bg)) continue;
        GROUND.clearRect(0, 0, 1, 1);
        GROUND.fillStyle = bg;
        GROUND.fillRect(0, 0, 1, 1);
        const [r, g, b] = GROUND.getImageData(0, 0, 1, 1).data;
        return 0.2126 * r + 0.7152 * g + 0.0722 * b < 128;
      }
      return document.documentElement.classList.contains('dark');
    };
    const grounds = () => {
      df$('#sc-weft [data-lang][data-painted]').each((_i, listing) => {
        listing.dataset.codeGround = darkGround(listing) ? 'dark' : 'light';
      });
    };
    let shiki = null;
    const paintCode = async () => {
      const listings = df$('#sc-weft [data-lang]:not([data-painted])').toArray();
      if (!listings.length) return;
      try {
        shiki ??= await import('https://esm.sh/shiki@3.0.0');
      } catch {
        return;
      }
      for (const listing of listings) {
        // the lines: a mockup's line elements, else the element itself (one line)
        const codes = df$(listing).find('pre > code').toArray();
        const lines = codes.length ? codes : [listing];
        const texts = lines.map((line) => line.textContent);
        const { tokens } = await shiki.codeToTokens(texts.join('\n'), {
          lang: listing.dataset.lang,
          themes: { light: 'github-light', dark: 'github-dark' },
          defaultColor: false,
        });
        // written again while Shiki worked: the next run paints the new text
        if (lines.some((line, i) => line.textContent !== texts[i])) continue;
        let at = 0;
        lines.forEach((line, i) => {
          const rows = tokens.slice(at, at + texts[i].split('\n').length);
          at += rows.length;
          df$(line).html('');
          rows.forEach((row, r) => {
            if (r) df$(line).append(document.createTextNode('\n'));
            for (const token of row) {
              const style = Object.entries(token.htmlStyle ?? {})
                .map(([name, value]) => name + ':' + value)
                .join(';');
              df$(line).append(df$('<span></span>').attr('style', style).text(token.content));
            }
          });
        });
        listing.dataset.painted = '';
      }
      grounds();
    };
    // a look or a mode changes the ground
    document.addEventListener('defuss-theme-change', () => requestAnimationFrame(grounds));
    new MutationObserver(() => requestAnimationFrame(grounds)).observe(document.documentElement, {
      attributes: true,
      attributeFilter: ['class'],
    });
    new MutationObserver(() => requestAnimationFrame(grounds)).observe(root, {
      attributes: true,
      attributeFilter: ['data-look'],
    });
    paintCode();

    // light or dark: the switch writes the page's dark class (every look has both palettes); it follows the class when
    // something else sets it (the docs card follows the site's mode)
    const siteMode = df$('#sc-weft [data-site-mode]');
    const syncMode = () => siteMode.prop('checked', document.documentElement.classList.contains('dark'));
    siteMode.on('change', () => {
      document.documentElement.classList.toggle('dark', siteMode.prop('checked'));
      document.dispatchEvent(new CustomEvent('defuss-theme-change'));
    });
    new MutationObserver(syncMode).observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });
    syncMode();

    // the look: one of the site's designs; an element's data-look-set gives it that look's attributes, and the
    // shaders read their token colours again on defuss-theme-change
    const look = df$('#sc-weft [data-site-look]');
    const applyLook = () => {
      df$('#sc-weft [data-look-set]').each((_i, el) => {
        const sets = JSON.parse(el.dataset.lookSet);
        for (const [name, value] of Object.entries(sets[root.dataset.look] ?? sets.default ?? {}))
          df$(el).attr(name, value);
      });
      document.dispatchEvent(new CustomEvent('defuss-theme-change'));
    };
    look.val(root.dataset.look).on('change', () => {
      root.dataset.look = look.val();
      applyLook();
    });

    // the install command: copied with the Clipboard API, the label says so for two seconds
    df$('#sc-weft [data-wf-copy]').on('click', (event) => {
      const button = df$(event.currentTarget);
      const label = button.find('[data-wf-copy-label]');
      const text = button.closest('.wf-install').find('code').text();
      const said = (word) => {
        label.text(word);
        setTimeout(() => label.text('Copy'), 2000);
      };
      navigator.clipboard?.writeText(text).then(
        () => said('Copied'),
        () => said('Select it'),
      ) ?? said('Select it');
    });

    // start a project: the command follows the form as it is filled; sending shows it again (a demo - nothing
    // leaves the page); closing resets the form
    const form = df$('#sc-weft [data-sc-form]');
    const dialog = form.closest('dialog');
    const command = () => {
      const data = new FormData(form.get(0));
      const name = String(data.get('name') || 'hello');
      const pm = String(data.get('pm'));
      const create = { bun: 'bun create', npm: 'npm create', pnpm: 'pnpm create' }[pm];
      return `${create} weft@latest ${name} --template ${data.get('template')}`;
    };
    // a command written again is painted again
    const writeCommand = (selector) => {
      df$(selector).text(command()).attr('data-painted', null);
      paintCode();
    };
    const showCommand = () => writeCommand('#sc-weft [data-wf-command]');
    form.on('input', showCommand).on('change', showCommand);
    form.on('submit', (event) => {
      event.preventDefault();
      writeCommand('#sc-weft [data-wf-command-done]');
      dialog.attr('data-sent', '');
      dialog.find('.sc-done').get(0).focus();
    });
    dialog.on('close', () => {
      dialog.attr('data-sent', null);
      form.get(0).reset();
      showCommand();
    });

    // the terminal's commands: a small weft CLI over the files of the tabs
    const ROUTES = [
      ['/', 'routes/index.tsx', 'server + 1 island'],
      ['/todos', 'routes/todos.tsx', 'server action'],
      ['/blog/:slug', 'routes/blog/[slug].tsx', 'prerendered'],
    ];
    const tone = (text, kind) => df$.shadcn.terminal.tone(text, kind);
    df$.shadcn.terminal.commands('wf-shell', {
      weft: {
        description: 'the weft CLI (weft routes, weft build, weft deploy, weft --version)',
        run: ({ args }) => {
          switch (args[0]) {
            case '--version':
            case '-v':
              return 'weft 4.2.0';
            case 'routes':
              return ROUTES.map(
                ([path, file, kind]) => tone(path.padEnd(14), 'bold') + file.padEnd(26) + tone(kind, 'muted'),
              );
            case 'build':
              return [
                '✔ split 3 files into server and client in 84 ms',
                'client  ' + tone('14.2 KB', 'bold') + '  (runtime 9.4 KB, islands 0.6 KB, routes 4.2 KB)',
                'server  ' + tone('31.0 KB', 'bold'),
                tone('ready to deploy: dist/', 'success'),
              ];
            case 'deploy':
              return ['adapter  bun (package.json)', tone('✔ live at https://hello.example.app in 6.1 s', 'success')];
            case 'dev':
              return 'already running at http://localhost:5170/';
            default:
              return [
                'usage: weft <command>',
                '  dev       start the dev server',
                '  routes    list the routes',
                '  build     build for production',
                '  deploy    build and ship with your adapter',
              ];
          }
        },
      },
      ls: { description: 'lists the project', run: () => 'routes/  server/  islands/  package.json' },
    });
  });
</script>
```

<DocText>Composed from <DocLink href="site-header.html">Site Header</DocLink>, <DocLink href="brand-logos.html">Brand Logos</DocLink> (rolling), <DocLink href="section-header.html">Section Header</DocLink>, <DocLink href="tabs.html">Tabs</DocLink> with <DocLink href="mockup-code.html">Code</DocLink> mockups, a live <DocLink href="terminal.html">Terminal</DocLink> (it replays a project being made, then answers <code>weft routes</code>, <code>weft build</code> and <code>help</code>), <DocLink href="integration-item.html">Integration Item</DocLink>, a <DocLink href="timeline.html">Timeline</DocLink> of releases with <DocLink href="badge.html">Badge</DocLink>s, <DocLink href="dialog.html">Dialog</DocLink> and <DocLink href="site-footer.html">Site Footer</DocLink>. The hero's light is a <DocLink href="shader.html">Shader</DocLink> (warp); more Shaders draw the islands tile (dot-orbit), a ring of light around the terminal (pulsing-border), contour lines under the adapters (topography) and a woven floor under the closing call (surface, weave) - all in the look's token colours. Every listing and command is painted by Shiki; the headline turns with <DocLink href="text-rotate.html">Text Rotate</DocLink>, the tiles and bars come in with <DocLink href="motion.html">Motion</DocLink>, and the release tag, the starburst, the hexagon, the sticker on the code, the stamps, the floating cube, orb and prism, the sketched note and the slanted closing band are <DocLink href="shapes.html">Shapes</DocLink> utilities. Blueprint lays the shapes' drafting grid behind the page.</DocText>

</DocPage>
