Four terminal progress bars filling at their own pace, with percent and a spinner.
⠦ fetch █████░░░░░░░░░░░░░░░░░░░░░░░░░ 16% ⠧ resolve ███░░░░░░░░░░░░░░░░░░░░░░░░░░░ 12% ⠇ build ███░░░░░░░░░░░░░░░░░░░░░░░░░░░ 9% ⠏ deploy ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 7%
Paste two lines into any page, use it from React, play it in a terminal, put a GIF in a README, or hand the Agent prompt to your coding agent. Every tab follows the look you pick above.
<script type="module" src="https://www.ascii-magic.com/ascii/ascii.js"></script>
<ascii-art piece="progress-loader"></ascii-art>// npm install ascii-magic-art
import { useEffect, useRef } from "react";
import { play } from "ascii-magic-art/runtime/player.js";
import * as piece from "ascii-magic-art/pieces/progress-loader.js";
export function ProgressLoader() {
const ref = useRef(null);
// play() draws the piece on a canvas in your look and returns stop(), which React runs on unmount
useEffect(() => play(ref.current, piece), []);
return <pre ref={ref} style={{ fontSize: 10, fontFamily: "Menlo, Consolas, monospace" }} />;
}npx ascii-magic-art progress-loader<!-- Export the GIF below in the look you picked, commit it, then: -->
<p align="center">
<img src="assets/progress-loader.gif" alt="Progress Loader, animated ASCII art" width="720">
</p>Add the animated ASCII art piece "progress-loader" (Progress Loader) from ASCII Magic to this project.
1. Load the script once, in the browser only (in SSR frameworks such as Next.js, load it on the client):
<script type="module" src="https://www.ascii-magic.com/ascii/ascii.js"></script>
2. Put the piece where it fits best, such as the hero, a loading state, an empty state or the 404 page:
<ascii-art piece="progress-loader"></ascii-art>
3. Keep a real heading or text next to it (the art is decoration), and size it with the size attribute or CSS.
Preview and options: https://www.ascii-magic.com/ascii/progress-loader
Rules for coding agents: https://www.ascii-magic.com/ascii/use/ai-coding-agentsPause on the frame you like, pick a look, then download it at an exact size.
MIT licensed and open source on GitHub. It imports one small helper file, kit.js. This is the animation itself: what gets drawn in every frame. The look you pick is applied on top by the player, like a filter, so this file stays the same in every look while the snippets above change with it. Edit it to change the animation; see the docs to make your own.
/* progress-loader: a stack of terminal progress bars, each filling at its own pace. */
import { Grid, palette } from "../lib/kit.js";
export const meta = {
slug: "progress-loader",
name: "Progress Loader",
category: "screens",
note: "Four terminal progress bars filling at their own pace, with percent and a spinner.",
tags: ["loader", "terminal", "cli", "install"],
cols: 56, rows: 9, fps: 15,
palette: palette(["#7ee787", "#79c0ff", "#8b949e", "#e6edf3"]),
};
const TASKS = [["fetch", 3.1], ["resolve", 4.3], ["build", 5.7], ["deploy", 7.2]];
const SPIN = "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏";
export default function create() {
const g = new Grid(meta.cols, meta.rows);
return (t) => {
g.clear();
const loop = t % 9;
TASKS.forEach(([name, dur], i) => {
const y = 1 + i * 2;
const p = Math.min(1, loop / dur);
const w = 30, n = Math.round(p * w);
g.text(2, y, (p < 1 ? SPIN[Math.floor(t * 12 + i) % SPIN.length] : "✓"), p < 1 ? "1" : "0");
g.text(4, y, name.padEnd(8), "3");
g.text(13, y, "█".repeat(n), p < 1 ? "1" : "0");
g.text(13 + n, y, "░".repeat(w - n), "2");
g.text(45, y, String(Math.round(p * 100)).padStart(3) + "%", "3");
});
return g.frame();
};
}
/YOUR OWN
The pieces here are hand-built animations. To turn your own photo, logo or video into animated ASCII, use the ASCII Magic editor.