Line, bar and sparkline charts drawn in glyphs, with a hidden data table for screen readers.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
Code
"use client";
import { AsciiChart } from "@/registry/ui/ascii-chart";
const visits = [12, 18, 15, 26, 22, 31, 28, 40, 36, 44, 39, 52];
export default function AsciiChartDemo() {
return (
<div style={{ display: "grid", gap: 16, width: "100%", maxWidth: 520 }}>
<AsciiChart label="Weekly visits" data={visits} style={{ height: 120 }} />
<AsciiChart type="bar" label="Weekly visits" data={visits} style={{ height: 120 }} />
<div>
Signups <AsciiChart type="sparkline" label="Daily signups" data={[3, 5, 4, 8, 6, 9, 12, 10]} />
</div>
</div>
);
}
































