23rd logo23rd

ASCII Logo

An ASCII wordmark that dodges the cursor and scatters, falls, and regroups on click.

Preview

Installation

pnpm dlx shadcn@latest add @23rd/ascii-logo

Or from the public GitHub registry:

pnpm dlx shadcn@latest add radiumcoders/23rd.dev/ascii-logo

Usage

Give the parent a size; the canvas fills it.

"use client"

import { AsciiLogo } from "@/components/ui/ascii-logo"

export function FooterMark() {
  return (
    <div className="relative h-64 w-full overflow-hidden bg-background">
      <AsciiLogo text="23rd" />
    </div>
  )
}

text takes up to 5 letters. Pass src to sample an image instead (any raster, or a same-origin SVG).

<AsciiLogo src="/logo-mark.png" />

Clicks cycle logo → scattered → fallen → returning → logo.

Props

PropTypeDefault
textstring"23rd" (max 5 letters)
srcstringnone
fitnumber0.82
cellSizenumber11
cellGapnumber2
charsetstringletters, numbers, a few symbols
thresholdnumber0.2
invertbooleantrue when src is set
colorstringtheme ink
backgroundColorstringtheme paper
hoverRadiusnumber7
hoverPushnumber2.6
hoverEasenumber0.18
scatterRangenumber16
scatterEasenumber0.055
gravitynumber0.14
bouncenumber0.28
resetEasenumber0.08
staggerFramesnumber18
interactivebooleantrue
theme"light" | "dark" | "auto"auto
labelstringtext or "ASCII logo"
onPhaseChange(phase) => voidnone
classNamestringReact only
classstringSvelte only