About
Turn an image or a slow moving pattern into a picture made of text characters.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds ASCII to your project and fits it to your theme.
Code
How ASCII is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import { Ascii, type AsciiColorMode } from "@/components/ui/honest-ascii";
const sources = [
{ label: "Procedural field", value: "procedural", src: undefined, alt: undefined },
{
label: "Alpine dusk",
value: "alpine",
src: "https://cdn.21st.dev/assets/mirror/2f/2f0f4f8872c14bf6371a864f07ab79be9bb0a7892731b3c5e14ddbb9354c5095.jpg",
alt: "An alpine lake reflecting an orange sunset between dark mountain ridges.",
},
{
label: "Color-blocked city",
value: "city",
src: "https://cdn.21st.dev/assets/mirror/9b/9b9e207a9a5933104f1dbbde76c43fc4fd1e77104cd3924ca04e217feb9bcee7.jpg",
alt: "Blue and orange apartment buildings against a clear sky.",
},
] as const;
interface AsciiSettings {
source: string;
characters: string;
cellSize: number;
colorMode: AsciiColorMode;
color: string;
backgroundColor: string;
contrast: number;
brightness: number;
animated: boolean;
}
const defaults: AsciiSettings = {
source: "procedural",
characters: " .:-=+*#%@",
cellSize: 12,
colorMode: "mono",
color: "#e8ecf4",
backgroundColor: "#0b0d12",
contrast: 1.35,
brightness: 0,
animated: true,
};
export default function AsciiDemo() {
const settings = defaults;
const source = sources.find((item) => item.value === settings.source) ?? sources[0];
const { source: _source, ...props } = settings;
void _source;
return (
<div className="flex min-h-[420px] w-full items-center justify-center p-6">
<div className="h-80 w-full max-w-xl overflow-hidden rounded-xl">
{source.src ? (
<Ascii className="size-full" src={source.src} alt={source.alt} {...props} />
) : (
<Ascii className="size-full" {...props} />
)}
</div>
</div>
);
}
















