Manifest reference¶
The deck DSL you use in deck.py. Everything here is imported from the top-level
inkflow package:
Refer to the Enums reference page for the shared value types used across this section. For the implemented animation and transition types, see the Animations and Transitions reference pages.
Deck
dataclass
¶
The top-level presentation container.
Define a main() -> Deck function in deck.py; inkflow calls it at serve
time.
Deck → Slide inheritance:
transition,font_size— override: a slide value replaces the deck default;Noneon the slide inherits.style/extra_style— additive:Deck.styleis emitted first, thenSlide.extra_style; the slide CSS wins on equal-specificity rules via cascade order.theme,mode,embed_fonts,title— deck-only; no per-slide override.
def main() -> Deck:
return Deck(
transition=transitions.Crossfade(),
theme="./my-theme",
mode=ColorMode.DARK,
slides=[...],
)
slides
class-attribute
instance-attribute
¶
The ordered slide list.
transition
class-attribute
instance-attribute
¶
Default transition for all slides. A Cut (instant) is used when unset.
theme
class-attribute
instance-attribute
¶
Path to a theme directory. None uses the built-in theme.
mode
class-attribute
instance-attribute
¶
Dark or light color mode for the presentation.
style
class-attribute
instance-attribute
¶
CSS injected into every slide. A bare str is a file path; Inline(...)
is a literal CSS string.
font_size
class-attribute
instance-attribute
¶
Base font size for zone content, in px.
embed_fonts
class-attribute
instance-attribute
¶
Auto-discover and embed the fonts used in slides. Set False to opt out.
title
class-attribute
instance-attribute
¶
Presentation title, used for the browser tab, static build page, and PDF
metadata. None infers a title from the project directory name.
Slide
dataclass
¶
A single slide.
src is a reference to an SVG file. Any SVG can define named zones, and
if it does, md/zones inject content into them — whether that SVG is
a one-off slide in slides/ or a reusable layout in layouts/ shared
across many slides.
Markdown content can link to another slide by id with the slide: scheme
([overview](slide:overview)); clicking it jumps to that slide with a cut
transition. Unresolved ids are silently ignored.
# One-off SVG with animations, no zones
Slide("title", animations=[animations.FadeIn("#headline", step=1)])
# Reusable layout with Markdown-filled zones
Slide("default", md="bullets", zones={"media": Image("photo.jpg")})
src
instance-attribute
¶
Reference to the slide's SVG file. A bare name (e.g. "default") is
looked up in slides/ first, then searched across layouts (project →
theme → built-in); prefix with local:, theme:, or builtin: to
pin to one of those directly.
id
class-attribute
instance-attribute
¶
Stable identifier, used as the slide: link target. Auto-inferred from the
.md filename stem or the src stem when unset. Must be unique across the
deck; collisions are resolved by appending -2, -3, …
md
class-attribute
instance-attribute
¶
Path to a .md file, or Inline("...") for inline Markdown. Content is
routed into src's zones, if it defines any.
zones
class-attribute
instance-attribute
¶
Per-zone overrides. Keys are zone names without the zone- prefix; values
are ZoneContent (inline Markdown str, TextBox, or
Media).
animations
class-attribute
instance-attribute
¶
Animation declarations for this slide.
transition
class-attribute
instance-attribute
¶
Transition into this slide. None inherits the deck default.
extra_style
class-attribute
instance-attribute
¶
CSS appended to the deck style for this slide. A bare str is a file path;
Inline(...) is a literal CSS string.
title
class-attribute
instance-attribute
¶
Optional slide title. Auto-inferred from the filename or a leading
# heading when unset.
notes
class-attribute
instance-attribute
¶
Speaker notes rendered as Markdown. A bare str is a file path;
Inline("...") is literal content. Concatenated with any ::notes:: marker
in the Markdown file.
visible
class-attribute
instance-attribute
¶
When False, the slide is excluded from the presentation entirely.
font_size
class-attribute
instance-attribute
¶
Per-slide base font size in px. None inherits Deck.font_size.
Image
dataclass
¶
Video
dataclass
¶
Bases: _MediaBase
A video asset for injection into a zone, with playback control.
Pass it as a value in a slide's zones dict to inject it into that zone.
Playback is driven by the presenter, so play_on_step ties a clip into the
slide's step sequence exactly like any other stepped element.
controls
class-attribute
instance-attribute
¶
Show the browser's native playback controls.
autoplay
class-attribute
instance-attribute
¶
Start playing when the slide loads.
muted
class-attribute
instance-attribute
¶
Audio muting policy. AUTO mutes only when autoplay is set, so the
browser never blocks autoplay by default; ON always mutes; OFF never
mutes.
poster
class-attribute
instance-attribute
¶
Path/URL of a still image shown before playback begins.
start
class-attribute
instance-attribute
¶
Trim-in time in seconds (temporal trim, distinct from the spatial
fit/align crop).
play_on_step
class-attribute
instance-attribute
¶
Step at which the clip starts playing. Active when
play_on_step <= current_step; stepping back below it resets to start.
None means playback is governed by autoplay/controls alone.
TextBox
dataclass
¶
Explicit text content and alignment for a named zone in an SVG slide.
Pass it as a value in a slide's zones dict to inject HTML into that zone
with alignment control. Each alignment param defaults to None, meaning
"defer to the layout's CSS variable".
text
class-attribute
instance-attribute
¶
HTML content to inject into the zone.
align
class-attribute
instance-attribute
¶
Horizontal text alignment. None defers to the layout CSS variable.
valign
class-attribute
instance-attribute
¶
Vertical alignment of the content block. None defers to the CSS variable.
padding
class-attribute
instance-attribute
¶
Inner padding in SVG user units. None defers to the CSS variable.
Inline ¶
Bases: str
Marks a string as literal content rather than a file path.
Fields typed as Content interpret a bare str as a file path to read.
Wrapping the value in Inline(...) signals that the string itself is the
content — rendered as Markdown for notes/md, or used as CSS for
style/extra_style.
Inline subclasses str, so isinstance(Inline("x"), str) is True
and it compares equal to its content. The distinction only matters at pipeline
resolution time.
Content
module-attribute
¶
A field that accepts either a file path or literal content.
A bare str is treated as a path to read; an Inline value is used
verbatim. None means "nothing". Used by Slide.md, Slide.notes,
Slide.extra_style, and Deck.style.
ZoneContent
module-attribute
¶
A value accepted in Slide.zones.
A str is rendered as inline Markdown; a TextBox gives explicit
alignment and padding control; an Image or Video injects media.