Skip to content

Sparks cheat sheet

The syntax on one page. Sparks explains each part with live examples.

`~{DATA, type, size, color, look, markers}` modifiers in any order, all optional
Signups climbed `~{12 13 12 15 17 16 19 21, end}` in eight weeks.
Plan `~{72/80, bullet, c3}` · onboarding `~{72%, sm}`

Single backticks, a ~ before the braces. \~{…} keeps it as plain code.

WriteMeansDraws by default
~{12 14 13 17}A series: 2 to 48 numbers, spaces betweenA line
~{72%}A share of 100A ring
~{18/24}A value over a totalA ring

Numbers only: no units, commas or currency signs (1200, not 1,200 or $1.2K). Negatives and decimals are fine.

TypeDataShows
(line)seriesThe shape of change
areaseriesShape, with weight under the line
barseriesThe size of each period, always from zero
stepseriesA value that holds, then jumps
winlossseriesHit (above 0), miss (below 0, hollow), tie (0)
(ring)ratioPart of a whole
bulletratioA value against a target tick
KindWordsDefault
Sizesm · md · lgmd
Colorc1 … c12 — the same numbered slots pills usec1
Lookpigment (the color fills the tile) · etching (a clear tile, the color is the line) · tone (one hue, stepped by value)pigment

A look sets the tile, its edge, the line and the bars together, from the one color.

WordDoes
endDots the latest value, in the accent color
minmaxDots the low and the high
zeroStarts the axis at 0, so a flat series reads flat
fillStretches the spark to the width of its line (every type but ring)
KindWordsDefault
Frameframed · bare (ink in the line, no tile)framed
Cornerssquare · roundedsquare

The most specific wins, one setting at a time.

ScopeWrite
One spark`~{1 3 2, etching, rounded}`
One slide<!-- _class: table spark-bare --> — any word with spark- in front
The whole deckspark: etching rounded in front matter

The deck-level words are frame, look and corners: framed · bare · pigment · etching · tone · square · rounded.

With mode: sketch, sparks are drawn by hand like the tables around them: the tile’s edge, the line, the bars’ outlines, the bullet’s tick and the ring. Nothing to write. Sparks in the header or footer stay clean.

A span that looks like a spark but doesn’t parse stays as plain code, and lint:deck says why:

WrittenReported
~{1,200 1,450}1,200 is not a number: no units, commas or currency signs
~{5}one number is not a trend: write a series, or a ratio like 72/80
~{72%, bar}a bar needs a series of two or more numbers
~{1 2 3, ring}a ring takes one value, not a series
~{3 5 4, bar, end}end only goes on line, area and step
~{3 5 4, c13}c13 is not a spark modifier
~{1 2, etching, tone}repeats the look — one word per setting

In the Studio, spark-too-big also warns when a spark is too wide for its space or more than 1.5 lines tall, with a one-click fix to the size that fits.