Kinetic UI
Back to Introduction
Text Effects

ASCII Renderer

A real-time engine that converts images, videos, and webcam feeds into interactive ASCII text.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add ascii-renderer

The AsciiRenderer component is the ultimate "hacker" aesthetic tool. It works by painting an image, a playing video, or a live webcam feed onto a hidden HTML5 Canvas. It then reads the pixel data, calculates the perceived brightness of each pixel block, and maps it to a string of ASCII characters (from dark space to bright @).

It runs on a requestAnimationFrame loop, meaning it natively supports 60fps video and webcam playback directly in the DOM as raw text!

Live Preview

ASCII Renderer
Ascii_Renderer.exe [image]
INITIALIZING DATA STREAM...

Installation

npx kinetic-ui-cli@latest add ascii-renderer

[!WARNING] Webcam Permissions: If you enable the useWebcam prop, the browser will immediately prompt the user for Camera permissions via navigator.mediaDevices. If the user denies permission, the component will output a "WEBCAM ACCESS DENIED" text fallback.

Props

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

import { AsciiRenderer } from "@/components/creative/ascii-renderer";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { AsciiRenderer } from "@/components/creative/ascii-renderer";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <AsciiRenderer
        src="example"
        isVideo{true}
        useWebcam{true}
      />
    </div>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.