String Art Hero

Weft and Pin, a weaving school in Porto

One thread, pulled into a face.

Portraits woven from a single unbroken line of linen, taught over two quiet weekends at our studio by the river. No experience needed, only patience.

Portrait of a man in a grey sweater against a pale wall
About this block

String Art HeroPRO

A weaving school hero built on the string-art component: a round board ringed with nails where one thread is woven pin to pin in real time until a portrait appears, the pass being pulled lit in the accent color, then the finished piece rests, fades and a new photo begins. Hovering speeds the weaving and leans the board, a click moves on. Beside it sit an eyebrow, a serif headline, an intro, an Arrow Pill and an underline link; thread and board follow the theme.

Hero227: String Art Hero

A full-height hero beside a round string-art board ringed with nails, where a single thread is woven pin to pin in real time until a portrait appears, the pass being pulled lit in the accent color, before the finished piece rests, fades and the next photo begins; an eyebrow, a serif headline, an intro, an Arrow Pill and an underline link sit on the left.

Upgrade to Pro

Pro blocks install through the shadcn CLI with your license key and ship their full source. Docs and live previews stay open to everyone, so you can read every block's details first.

Upgrade Now

Installation

Swap YOUR_EMAIL and YOUR_KEY for the email and license key on your account. Find your license key on your account page.

Radix flavor

bash
npx shadcn add "https://ui.beste.co/r/hero227?email=YOUR_EMAIL&license_key=YOUR_KEY"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/hero227?email=YOUR_EMAIL&license_key=YOUR_KEY"

This installs the block to components/beste/block/hero227.tsx plus the string-art board and the button23 and button2 buttons it uses.

Quick start

The installed file exports hero227Demo alongside the block: the exact props behind the preview above. Spread it to get a working hero in one line.

tsx
import { Hero227, hero227Demo } from "@/components/beste/block/hero227";

export default function Page() {
  return <Hero227 {...hero227Demo} />;
}

Then replace the demo with your own props. Written out, a trimmed setup looks like this:

tsx
import { Hero227 } from "@/components/beste/block/hero227";

export default function Page() {
  return (
    <Hero227
      eyebrow="Weft and Pin, a weaving school in Porto"
      heading="One thread, pulled into a face."
      description="Portraits woven from a single unbroken line of linen, taught over two quiet weekends."
      buttons={[
        { label: "Join a weekend class", href: "/classes" },
        { label: "See finished pieces", href: "/gallery" },
      ]}
      board={{
        images: [
          {
            src: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=900&q=80",
            alt: "Portrait of a man in a grey sweater against a pale wall",
            focus: 0.32,
          },
          {
            src: "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=900&q=80",
            alt: "Portrait of a woman with short red hair by a lake",
            focus: 0.5,
          },
        ],
        pins: 220,
        lines: 3000,
        threadColor: "var(--foreground)",
        boardColor: "var(--background)",
        needleColor: "var(--primary)",
        speed: 260,
        hold: 4,
      }}
    />
  );
}

Props

PropTypeDefaultDescription
eyebrowstring–Muted line above the headline
headingstring–Serif headline, rendered as the page h1
descriptionstring–Intro under the headline
buttonsActionButton[][]The first renders as an Arrow Pill (Button23), the rest as underline links (Button2)
boardOmit<StringArtProps, "className" | "children">–Forwards the StringArt props from the string-art component, including the required images plus pins, passes, thread opacity, thread, board and needle colors, contrast, speed, hold, rim, tilt, interactive and paused
classNamestring–Extra classes for the outer <section>
ts
type ActionButton = {
  label: string;
  href: string;
};

type StringArtImage = {
  src: string;
  alt: string;
  /** Vertical focus of the square crop, 0 (top) to 1 (bottom) */
  focus?: number;
};

Behavior notes

  • The board only renders when board is set and is a square capped at 600px; photos are loaded with CORS so the canvas can read them, so their host must allow cross-origin requests.
  • Each pass is chosen by a greedy string art method on a grayscale copy of the photo, and the weave stops early once the picture is used up, even before lines passes.
  • Hovering speeds the weaving and leans the board, and a click starts the next portrait. The work is time sliced so it never blocks the page.
  • With the demo colors set to var(--foreground), var(--background) and var(--primary), thread, board and needle follow the theme.
  • With reduced motion the board weaves the finished portrait without the needle or tilt, and the copy and board skip their rise-in.
  • The copy and board stack below lg, where the board narrows to 86% and then 72% of the width.

More Hero blocks

View all Hero
PRO

hero235

Bauhaus Composition Hero

PRO

hero198

Ink Flow Hero

PRO

hero248

Sketch to Photo Hero

Get Pro access