Reference

Component library

Every <deck-*> element · attributes, slots, tokens, live preview. 26 components total, but you'll only meet five on day one.

Mental model · which one do I need?

The 24 components fit in five buckets. Use this as a triage map.

New to Rikiki? Read the 5-component cheatsheet first · don't try to learn all 24 before your first talk.

Rikiki ships 6 layouts and 18 atoms. The layouts define a slide's overall structure; the atoms fill the slots. Both groups follow the same design-token contract · override --deck-<tag>-* on the host to retheme a single instance, or globally on :root.

Layouts

One per typical slide kind. Pick the layout that matches the slide's job.

<deck-cover>

Opening slide · XL title on dark, optional brand mark, meta block.

Attributes

AttributeTypeNotes
brand string Text label · split on " · " (first segment = brand name)
brand-src URL Optional logo path
speaker string
company string
duration string
audience string
runtime string

Slots

SlotWhat goes in
(default) Title (h1) and subtitle (.sub)

Example

<deck-cover brand="rikiki · docs" speaker="Jane">
  <h1>Hello, <span class="accent">world</span>.</h1>
  <p class="sub">Sub-title or opening question.</p>
</deck-cover>
Live preview · slide canvas

Customization tokens

--deck-cover-bg · --deck-cover-text · --deck-cover-soft · --deck-cover-muted · --deck-cover-faint · --deck-cover-border

<deck-section>

Chapter separator · number + centered title on dark. Marks a 2D-nav boundary.

Attributes

AttributeTypeNotes
num string Small label above the title

Slots

SlotWhat goes in
(default) Title (h1)

Example

<deck-section num="02">
  <h1>Anatomy</h1>
</deck-section>
Live preview · slide canvas

Customization tokens

--deck-section-bg · --deck-section-num-color · --deck-section-title-color · --deck-section-em-color · --deck-section-rule-color

<deck-feature>

One focal block · code, table, mermaid, big stat.

Attributes

AttributeTypeNotes
eyebrow string Small pill above the title

Slots

SlotWhat goes in
title h1
lead one-line intro
(default) The focal block · usually deck-code, deck-mermaid, or a custom widget

Example

<deck-feature eyebrow="Module">
  <h1 slot="title">Side effects</h1>
  <p slot="lead" class="lead">A module can act on import.</p>
  <deck-code lang="ts" hero>
    import './polyfill';
  </deck-code>
</deck-feature>
Live preview · slide canvas

Customization tokens

--deck-eyebrow-bg · --deck-eyebrow-color · --deck-eyebrow-radius · --deck-eyebrow-padding-x · --deck-eyebrow-padding-y

<deck-split>

Two or three columns of cards.

Attributes

AttributeTypeNotes
cols "1-1" | "1-2" | "2-1" | "3" Default 1-1
gap 1..6 maps to var(--rik-space-N)
col-gap 1..6 gap between children inside a column

Slots

SlotWhat goes in
title / lead header above the columns
left / right 2-col layout
a / b / c 3-col layout

Example

<deck-split cols="1-1">
  <h1 slot="title">Two takes</h1>
  <deck-card slot="left" color="red">Problem</deck-card>
  <deck-card slot="right" color="green">Fix</deck-card>
</deck-split>
Live preview · slide canvas

Customization tokens

--deck-split-gap · --deck-split-col-gap · --deck-eyebrow-bg · --deck-eyebrow-color

<deck-feature-cards>

Hero on top, two detail cards underneath.

Attributes

AttributeTypeNotes
eyebrow string

Slots

SlotWhat goes in
title / lead header
(default) the hero block · usually deck-code or deck-mermaid
left / right the two detail cards

Example

<deck-feature-cards eyebrow="Deep dive">
  <h1 slot="title">One thing at a time</h1>
  <deck-code lang="ts" hero>function run() { return 42; }</deck-code>
  <deck-card slot="left">What changes</deck-card>
  <deck-card slot="right">What stays</deck-card>
</deck-feature-cards>
Live preview · slide canvas

Customization tokens

--deck-feature-cards-gap · --deck-feature-cards-col-gap · --deck-feature-cards-hero-flex · --deck-feature-cards-detail-flex · --deck-eyebrow-bg · --deck-eyebrow-color

<deck-takeaway>

Centered punchline on dark · the take-home line.

Attributes

AttributeTypeNotes
kicker string Small caption above the punch

Slots

SlotWhat goes in
(default) Use <deck-punch size="display"> for the big text

Example

<deck-takeaway kicker="The whole point">
  <deck-punch size="display">Source = output.</deck-punch>
  <p class="caption on-dark">A deck is a folder.</p>
</deck-takeaway>
Live preview · slide canvas

Customization tokens

--deck-takeaway-bg · --deck-takeaway-display-color · --deck-takeaway-caption-color · --deck-takeaway-gap

<deck-photo>

Full-bleed image slide · slotted content sits on a dimmable overlay. Cover-style hero or mood section break.

Attributes

AttributeTypeNotes
src URL Image URL · required
position CSS object-position Default "center"
darken 0..1 Overlay alpha · default 0.35
align top | center | bottom Vertical alignment of slotted content
text-align left | center | right Text alignment inside the overlay · default left

Slots

SlotWhat goes in
(default) Title (h1), subtitle (.sub), or any HTML to overlay on the image

Example

<deck-photo src="/cover.jpg" darken="0.4" align="center">
  <h1>Mood opener</h1>
  <p class="sub">One line caption.</p>
</deck-photo>
Live preview · slide canvas

Customization tokens

--deck-photo-overlay-color · --deck-photo-text-color · --deck-photo-text-muted · --deck-photo-content-max-width

Atoms

The building blocks you slot inside layouts.

<deck-code>

Code block with light syntax highlighting · js, ts, html, css.

Attributes

AttributeTypeNotes
lang js | ts | html | css | …
hero boolean centers vertically as the focal block
nested boolean no shadow, lighter border (inside a card)
step-groups JSON [[1,2],[3,4]] · highlight subsets of lines on each step

Example

<deck-code lang="ts" hero>
  const greet = (n: string) => `Hi, ${n}`;
</deck-code>
Live preview

Customization tokens

--deck-code-bg · --deck-code-border · --deck-code-text · --deck-code-radius · --deck-code-padding-x · --deck-code-padding-y · --deck-code-syntax-{kw,str,num,cmt,ty,prop,fn}

<deck-md>

Markdown body · GFM, tables, lists, code, **bold**, *italic*.

Example

<deck-md>
  **Markdown** body with `inline code`, lists, and links.
</deck-md>
Live preview

Customization tokens

--deck-md-pre-bg · --deck-md-pre-border · --deck-md-pre-text

<deck-callout>

Boxed note with icon · info / warn / danger / ok.

Attributes

AttributeTypeNotes
type info | warn | danger | ok

Example

<deck-callout type="warn">
  <strong>Heads up ·</strong> this changes the public API.
</deck-callout>
Live preview

Customization tokens

--deck-callout-bg · --deck-callout-border · --deck-callout-stroke · --deck-callout-radius · --deck-callout-padding-x · --deck-callout-padding-y

<deck-card>

Tinted card · yellow, orange, green, red.

Attributes

AttributeTypeNotes
color yellow | orange | green | red
center boolean
compact boolean reduced padding

Example

<deck-card color="green">
  <h3>Tinted card</h3>
  <p>Used inside splits and grids.</p>
</deck-card>
Live preview

Customization tokens

--deck-card-bg · --deck-card-border · --deck-card-text · --deck-card-title-color · --deck-card-radius · --deck-card-padding-x · --deck-card-padding-y · --deck-card-shadow · --deck-card-gap

<deck-mermaid>

Mermaid diagram · loaded on demand from CDN. The only opt-in CDN dependency.

Attributes

AttributeTypeNotes
compact boolean reduced padding and max-width

Example

<deck-mermaid>
  graph LR
  a --> b --> c
</deck-mermaid>
Live preview

Customization tokens

--deck-mermaid-bg · --deck-mermaid-border · --deck-mermaid-padding · --deck-mermaid-radius

<deck-stat>

Big-number visual · for promises, metrics, milestones.

Attributes

AttributeTypeNotes
num string Huge display-font number
tone yellow|orange|green|red|purple|lime|cyan

Slots

SlotWhat goes in
claim Mid-size headline below the number
(default) One line of body text

Example

<deck-stat num="01" tone="orange">
  <h3 slot="claim">Open index.html</h3>
  No build, no toolchain.
</deck-stat>
Live preview

Customization tokens

--deck-stat-color · --deck-stat-num-size · --deck-stat-num-weight · --deck-stat-claim-color · --deck-stat-body-color · --deck-stat-border-width · --deck-stat-padding-x · --deck-stat-padding-y · --deck-stat-gap

<deck-badge>

Status pill · bad / ok / info / warn / neutral.

Attributes

AttributeTypeNotes
type bad | ok | info | warn | neutral

Example

<deck-badge type="ok">production-ready</deck-badge>
Live preview

Customization tokens

--deck-badge-bg · --deck-badge-fg · --deck-badge-border · --deck-badge-radius · --deck-badge-padding-x · --deck-badge-padding-y

<deck-metric>

One-line metric · label + value · severity colored. Wrap several in <deck-metric-list> for the rule-divided list look.

Attributes

AttributeTypeNotes
value string
severity bad | warn | ok | info
mono boolean

Example

<deck-metric-list>
  <deck-metric value="5"  severity="bad">Files parsed</deck-metric>
  <deck-metric value="1"  severity="ok">Used</deck-metric>
</deck-metric-list>
Live preview

Customization tokens

--deck-metric-bg · --deck-metric-border · --deck-metric-text · --deck-metric-radius · --deck-metric-padding-x · --deck-metric-padding-y · --deck-metric-shadow · --deck-metric-label-color · --deck-metric-value-{bad,warn,ok,info}

<deck-metric-list>

Container · rule dividers between stacked <deck-metric> rows. No attributes · purely a layout grouping.

Example

<deck-metric-list>
  <deck-metric value="5"  severity="bad">Files parsed</deck-metric>
  <deck-metric value="1"  severity="ok">Used</deck-metric>
</deck-metric-list>
Live preview

<deck-tier-list>

Tier list · for JIT levels, severity ladders, ranking.

Attributes

AttributeTypeNotes
name string
speed string right-side number
severity muted | warn | ok
hot boolean

Example

<deck-tier-list>
  <deck-tier name="LLInt" speed="×1">Bytecode</deck-tier>
  <deck-tier name="FTL"   speed="×100" hot>LLVM</deck-tier>
</deck-tier-list>
Live preview

Customization tokens

--deck-tier-bg · --deck-tier-border · --deck-tier-radius · --deck-tier-padding-x · --deck-tier-padding-y · --deck-tier-shadow · --deck-tier-name-color · --deck-tier-desc-color · --deck-tier-speed-{muted,warn,ok} · --deck-tier-hot-bg · --deck-tier-hot-border · --deck-tier-hot-color

<deck-step-list>

Numbered steps · big circle bullet, mono label, chip note.

Attributes

AttributeTypeNotes
n string Number or letter
note string Right-aligned chip

Example

<deck-step-list>
  <deck-step n="1" note="opens the deck">Cover</deck-step>
  <deck-step n="2" note="chapter break">Section</deck-step>
</deck-step-list>
Live preview

Customization tokens

--deck-step-bg · --deck-step-border · --deck-step-radius · --deck-step-padding-x · --deck-step-padding-y · --deck-step-shadow · --deck-step-num-bg · --deck-step-num-color · --deck-step-num-size · --deck-step-label-color · --deck-step-chip-bg · --deck-step-chip-color

<deck-shortcut>

Keyboard shortcut row · keys + label + note. Pairs with <deck-shortcut-list>.

Attributes

AttributeTypeNotes
keys string Space-separated · e.g. "Space PgDn"
label string
note string

Example

<deck-shortcut-list>
  <deck-shortcut keys="O" label="Overview" note="Path layout"/>
  <deck-shortcut keys="?" label="Help" note="Full shortcut overlay"/>
</deck-shortcut-list>
Live preview

Customization tokens

--deck-kbd-bg · --deck-kbd-color · --deck-kbd-border · --deck-kbd-radius · --deck-kbd-padding-x · --deck-kbd-padding-y · --deck-kbd-accent-bg · --deck-kbd-ok-bg

<deck-punch>

Big punchline text · sized via attribute, color via tone.

Attributes

AttributeTypeNotes
size lead | big | mega | stat | display
tone warn | danger | ok | info | muted | accent
weight 700 | 800 | 900
align left | center | right

Example

<deck-punch size="display">Source = output.</deck-punch>
Live preview

Customization tokens

--deck-punch-color · --deck-punch-size

<deck-stack>

Vertical (or horizontal) flex container · the most-used spacing helper.

Attributes

AttributeTypeNotes
gap 1..6
direction column | row
align start | center | end | stretch
justify start | center | end | between | around

Example

<deck-stack gap="3">
  <deck-callout>One</deck-callout>
  <deck-callout>Two</deck-callout>
</deck-stack>
Live preview

Customization tokens

--deck-stack-gap

<deck-grid>

Grid container · n columns by 1..12 or explicit template.

Attributes

AttributeTypeNotes
cols 1..12 | "1fr 2fr" | ...
rows 1..12 | "auto 1fr" | ... Optional explicit row template
gap 1..6
align start | center | end | stretch align-items
justify start | center | end | stretch justify-items
fill boolean Take the parent slide's full height

Example

<deck-grid cols="3" gap="3" fill>
  <deck-card>a</deck-card>
  <deck-card>b</deck-card>
  <deck-card>c</deck-card>
</deck-grid>
Live preview

Customization tokens

--deck-grid-gap

<deck-kicker>

Caption-style label above a section · uppercase, mono.

Attributes

AttributeTypeNotes
on-dark boolean Switch to the inverse-surface palette · use on dark backgrounds

Example

<deck-kicker>Before</deck-kicker>
Live preview

Customization tokens

--deck-kicker-color · --deck-kicker-on-dark-color · --deck-kicker-font-size · --deck-kicker-tracking · --deck-kicker-margin

<deck-notes>

Speaker notes for a slide · hidden by default, surfaced in the presenter window (press P). Free-form text content.

Slots

SlotWhat goes in
(default) Plain text or markup · displayed as-is in the presenter window

Example

<deck-feature>
  <h1 slot="title">My slide</h1>
  <deck-notes>
    Talking points:
    - Mention the migration story
    - Pause for laughter on the Java joke
  </deck-notes>
</deck-feature>
Live preview