Cathedral Design

Smokey Lettering

Heroes 1

About

A WebGL text reveal where each letter forms from translucent, drifting smoke. Includes a lime and charcoal gradient demo, replay control, responsive typography and a reduced-motion fallback. Built on the MIT-licensed Codrops GLText renderer.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Smokey Lettering to your project and fits it to your theme.

Code

How Smokey Lettering is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { useState } from "react";
import { SmokeyLettering } from "@/components/ui/smokey-lettering";

export default function SmokeyLetteringDemo() {
  const [replay, setReplay] = useState(0);
  return (
    <main className="smokey-demo">
      <style>{`
        @font-face{font-family:'Mona Sans Variable';font-style:normal;font-weight:200 900;font-display:swap;src:url('https://cdn.21st.dev/assets/mirror/a5/a59061e38c5e7e6a00aaa6b6645a220c7d9c530991167f058cc0f8575f5d5844.woff2') format('woff2')}
        .smokey-demo{width:100vw;max-width:100%;min-width:0;flex-shrink:0;box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;min-height:720px;min-height:100svh;padding:80px 4vw 100px;overflow:hidden;container-type:inline-size;color:#e8e2d8;font-family:'Mona Sans Variable',Arial,sans-serif;font-synthesis:none;background:radial-gradient(ellipse at 85% 4%,rgba(190,221,75,.31) 0%,rgba(91,110,42,.16) 28%,transparent 61%),radial-gradient(ellipse at 8% 90%,rgba(102,116,47,.12),transparent 60%),linear-gradient(145deg,#252922 0%,#181b17 48%,#111410 100%)}
        .smokey-demo *{box-sizing:border-box}
        .smokey-demo .smokey-demo__content{display:flex;flex-direction:column;width:100%;gap:clamp(60px,10cqw,140px)}
        .smokey-demo .smokey-demo__intro{margin:0;line-height:1.35;font-size:clamp(19px,2.4cqw,32px);max-width:650px;letter-spacing:-.02em}
        .smokey-demo .smokey-demo__title{font-size:clamp(32px,12.3cqw,190px);line-height:1.05;letter-spacing:0}
        .smokey-demo__label{position:absolute;top:32px;left:4vw;font-size:11px;font-weight:500;letter-spacing:.15em;text-transform:uppercase;color:#c2c8b8}
        .smokey-demo__replay{position:absolute;bottom:30px;right:4vw;display:inline-flex;align-items:center;gap:12px;min-height:44px;padding:10px 16px;border:1px solid rgba(232,226,216,.28);border-radius:999px;background:rgba(19,23,16,.24);color:#e8e2d8;font:inherit;font-size:13px;cursor:pointer}
        .smokey-demo__replay:hover{border-color:#c0e34e;background:rgba(192,227,78,.08)}
        .smokey-demo__replay:focus-visible{outline:2px solid #c0e34e;outline-offset:5px}
        @media(max-width:600px){.smokey-demo{min-height:max(660px,100svh);padding:110px 5vw 140px}.smokey-demo .smokey-demo__intro{max-width:90%;font-size:21px}.smokey-demo .smokey-demo__content{gap:85px}.smokey-demo__label{left:5vw}.smokey-demo__replay{right:5vw}}
      `}</style>
      <span className="smokey-demo__label">A little practical magic</span>
      <div className="smokey-demo__content">
      <p className="smokey-demo__intro">Fuelled by wisdom &amp; imagination, powered by creativity, this is:</p>
      <SmokeyLettering
        as="h1"
        text="Smokey Lettering"
        replayKey={replay}
        textClassName="smokey-demo__title"
      />
      </div>
      <button className="smokey-demo__replay" onClick={() => setReplay(value => value + 1)} type="button">
        <span aria-hidden="true">↻</span> Replay
      </button>
    </main>
  );
}

More by Cathedral Design

View all
  • Envelope Scroll to Open with Ribbon

    Envelope Scroll to Open with Ribbon

    124

More in Heroes

View all
  • Agency Hero Section

    Agency Hero Section

    1.1K
  • Responsive Hero Banner

    Responsive Hero Banner

    2.2K
  • SaaS Template

    SaaS Template

    2.7K
  • Centered Hero with Image Fan

    Centered Hero with Image Fan

    1.1K
  • Hero

    Hero

    1.4K
  • Hero Section 01

    Hero Section 01

    56
  • Split Hero With Image Cards

    Split Hero With Image Cards

    467
  • Facts Hero

    Facts Hero

    6