ns-ui

Sparkline ASCII

A production-usable sparkline chart drawn entirely in characters: block-fraction bars, keyboard-navigable column by column.

Use when a trend line that has to render in a monospace character grid, survive being copied as text, and be walked column by column from the keyboard, which rules out canvas and SVG; pick sparkline-automaton instead when it is a KPI tile that can afford a canvas, or chart-bar-halftone when the values are separate categories rather than a series over time.

Install

npx shadcn add https://design.helpmarq.com/r/sparkline-ascii.json
  • chart
  • ascii
  • data
  • keyboard
  • sparkline

ns-ui / sparkline-ascii

hover a column, or focus the chart and use arrow keys

Props

PropTypeDefaultDescription
datanumber[]the series to plot; needs at least one value
label?stringaccessible name for each column, e.g. "Revenue"; used in per-option labels
valueFormat?(value: number) => stringformats a raw value for the in-grid readout and accessible names
className?string