A sleepy wall clock sweeps its hands while little z's drift up from it, above a sign in again button.
╭──────────────────────────────────────────────────────╮ │ Z │ │ ▓▓▓█████▓▓▓ │ │ ▓██ ■ ██▓ Z │ │ ▓██ · ██ ██▓ z │ │ ▓██ · ██ · ██▓ │ │ ▓█ ██ █▓ │ │ ▓█ ■ ●███ ■ █▓ │ │ ▓██ · █ · ██▓ │ │ ▓██ · · ██▓ │ │ ▓██ ■ ██▓ │ │ ▓▓▓█████▓▓▓ │ │ │ │ │ │ Your session expired │ │ You were signed out after 30 minutes away. │ │ ╭───────────────╮ │ │ │ Sign in again │ │ │ ╰───────────────╯ │ ╰──────────────────────────────────────────────────────╯
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="empty-session-expired"></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/empty-session-expired.js";
export function EmptySessionExpired() {
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 empty-session-expired<!-- Export the GIF below in the look you picked, commit it, then: -->
<p align="center">
<img src="assets/empty-session-expired.gif" alt="Session Expired Clock, animated ASCII art" width="720">
</p>Add the animated ASCII art piece "empty-session-expired" (Session Expired Clock) 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="empty-session-expired"></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/empty-session-expired
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.
/* empty-session-expired: a sleepy wall clock with sweeping hands and drifting z's above a sign in again button. */
import { Grid, palette, TAU } from "../lib/kit.js";
const pal = palette(["#e6edf3", "#8b949e", "#484f58", "#30363d", "#7ee787", "#79c0ff", "#ffa657", "#ff7b72", "#d2a8ff", "#f2cc60", "#a371f7", "#6e40c9", "#3b2e58"]);
// 0 text, 1 muted, 2 dim, 3 border, 4 green, 5 blue, 6 orange, 7 red, 8 purple, 9 yellow, a violet, b deep violet, c night
export const meta = {
slug: "empty-session-expired",
name: "Session Expired Clock",
category: "empty-states",
note: "A sleepy wall clock sweeps its hands while little z's drift up from it, above a sign in again button.",
tags: ["empty-state", "session", "auth", "timeout", "app"],
cols: 56, rows: 20, fps: 24,
palette: pal,
};
const fit = (s, w) => (s.length <= w ? s : s.slice(0, Math.max(0, w - 2)) + "..");
export default function create() {
const W = meta.cols, H = meta.rows;
const g = new Grid(W, H);
const S = (x, y, c, co) => { x = Math.round(x); y = Math.round(y); if (x >= 1 && y >= 1 && x < W - 1 && y < H - 1) g.set(x, y, c, co); };
const mid = (y, s, co) => { s = fit(s, W - 4); g.text(Math.floor((W - s.length) / 2), y, s, co); };
const CX = 26, CY = 6.5, RX = 9.5, RY = 4.7;
const hand = (ang, len, co) => {
for (let i = 0; i <= 20; i++) {
const r = (i / 20) * len;
S(CX + Math.sin(ang) * RX * r, CY - Math.cos(ang) * RY * r, "█", co);
}
};
return (t) => {
g.clear();
g.box(0, 0, W, H, "round", "3");
// face and rim
for (let y = 1; y < 13; y++) for (let x = CX - 12; x <= CX + 12; x++) {
const d = Math.hypot((x - CX) / RX, (y - CY) / RY);
if (d < 0.86) S(x, y, " ");
else if (d < 1.12) S(x, y, d > 1.0 ? "▓" : "█", d > 1.0 ? "b" : "a");
}
for (let k = 0; k < 12; k++) {
const a = (k / 12) * TAU, r = 0.72;
S(CX + Math.sin(a) * RX * r, CY - Math.cos(a) * RY * r, k % 3 === 0 ? "■" : "·", k % 3 === 0 ? "0" : "1");
}
// hands: minute sweeps a lap every 6 s, hour creeps
hand((t / 6) * TAU, 0.6, "5");
hand((t / 72) * TAU + 2.2, 0.4, "0");
S(CX, CY, "●", "6");
// z's drifting up and away
for (let k = 0; k < 3; k++) {
const a = (t / 2.4 + k / 3) % 1;
const x = CX + 12 + a * 8 + Math.sin(a * 6 + k) * 0.8, y = CY - 1 - a * 5;
S(x, y, a > 0.45 ? "Z" : "z", a > 0.75 ? "2" : a > 0.4 ? "1" : "0");
}
mid(14, "Your session expired", "0");
mid(15, "You were signed out after 30 minutes away.", "1");
const label = "Sign in again", bw = label.length + 4, bx = Math.floor((W - bw) / 2);
g.box(bx, 16, bw, 3, "round", "5"); g.text(bx + 2, 17, label, "5");
return g.frame();
};
}
No results, all done, offline, success, error: the moments every app needs.
/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.