This component no longer exists. It was in componentry’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-14 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
ASCII Effect
componentry/ascii-effectRemovedComponent
Render images as responsive ASCII artwork with image, flow, and glitch variations.
Live preview
live · rendered by the registry
Rendered by componentry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://componentry.dev/r/ascii-effect.jsonSource
1"use client"23import { cn } from "@/lib/utils"4import { useEffect, useRef, type HTMLAttributes, type PointerEvent } from "react"56export interface AsciiEffectProps extends Omit<HTMLAttributes<HTMLDivElement>, "color"> {7 imageSrc: string8 alt?: string9 variant?: "image" | "flow" | "glitch"10 chars?: string11 fontSize?: number12 fontFamily?: string13 fontWeight?: number | string14 lineHeight?: number15 characterSpacing?: number16 brightnessBoost?: number17 contrast?: number18 threshold?: number19 posterize?: number20 dither?: "none" | "floyd-steinberg" | "bayer"21 ditherStrength?: number22 flowSpeed?: number23 flowDirection?: number24 flowStrength?: number25 flowFrequency?: number26 mouseRadius?: number27 mouseStrength?: number28 mouseWaveSpeed?: number29 scale?: number30 fit?: "cover" | "contain" | "stretch"31 colors?: string[]32 colorMode?: "gradient" | "source"33 backgroundColor?: string34 invert?: boolean35 glitchIntensity?: number36 glitchFrequency?: number37 revealDuration?: number38}3940export type AsciiPresetProps = Omit<AsciiEffectProps, "variant">4142const IMAGE_COLORS = ["#f4f4f5", "#a1a1aa"]43const FLOW_COLORS = ["#e2e8f0", "#67e8f9", "#818cf8"]44const GLITCH_COLORS = ["#ecfccb", "#a3e635", "#22d3ee"]4546function clamp(value: number, min = 0, max = 1) {47 return Math.min(max, Math.max(min, value))48}4950function parseHex(color: string) {51 const match = /^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(color)52 return match53 ? [Number.parseInt(match[1]!, 16), Number.parseInt(match[2]!, 16), Number.parseInt(match[3]!, 16)]54 : null55}5657function gradientColor(colors: string[], amount: number) {58 if (colors.length < 2) return colors[0] ?? "#ffffff"5960 const position = clamp(amount) * (colors.length - 1)61 const index = Math.min(Math.floor(position), colors.length - 2)62 const mix = position - index63 const from = parseHex(colors[index]!)64 const to = parseHex(colors[index + 1]!)65 if (!from || !to) return colors[Math.round(position)] ?? colors[0]!6667 return `rgb(${from.map((channel, i) => Math.round(channel + (to[i]! - channel) * mix)).join(", ")})`68}6970export function AsciiEffect({71 imageSrc,72 alt = "ASCII rendering",73 variant = "image",74 chars = " .:-=+*#%@",75 fontSize = 9,76 fontFamily = "Arial, Helvetica, sans-serif",77 fontWeight = 400,78 lineHeight = 1,79 characterSpacing = 1,80 brightnessBoost = 2.2,81 contrast = 1.1,82 threshold = 0.06,83 posterize = 32,84 dither = "floyd-steinberg",85 ditherStrength = 0.8,86 flowSpeed = 0.22,87// … truncated
More from componentry
All 35 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| animated-gradientanimated-gradient | componentry | Components | Unverified | no deps | |
| auth-modalauth-modal | componentry | Components | Unverified | no deps | |
| border-beamborder-beam | componentry | Components | Unverified | no deps | |
| circuit-boardcircuit-board | componentry | Components | Unverified | no deps | |
| closing-plasmaclosing-plasma | componentry | Components | Unverified | no deps | |
| collection-surfercollection-surfer | componentry | Components | Unverified | no deps | |
| command-menucommand-menu | componentry | Components | Unverified | no deps | |
| cursor-driven-particle-typographycursor-driven-particle-typography | componentry | Components | Unverified | no deps |
