Skip to content

Frontmatter Options

Complete reference for all frontmatter configuration options in Tap presentations.

Overview

Frontmatter is YAML configuration at the start of your presentation file, enclosed in triple dashes (---). These settings apply globally to your entire presentation unless overridden by slide directives.

yaml
---
title: My Presentation
theme: minimal
author: Jane Developer
transition: fade
---

Presentation Metadata

title

The presentation title, displayed in the browser tab and used for PDF exports.

PropertyValue
Typestring
DefaultFile name
RequiredNo
yaml
---
title: Quarterly Business Review
---

author

Author name for presentation metadata.

PropertyValue
Typestring
DefaultNone
RequiredNo
yaml
---
author: Jane Developer
---

date

Presentation date, useful for version tracking and PDF metadata.

PropertyValue
Typestring
DefaultNone
RequiredNo
yaml
---
date: 2024-01-15
---

Visual Appearance

theme

The visual theme applied to all slides. Themes control typography, colors, animations, transitions, and spacing.

PropertyValue
Typestring
Defaultminimal
RequiredNo
Optionsminimal, gradient, terminal, brutalist, keynote
yaml
---
theme: terminal
---

Available themes:

ThemeDescription
minimalClean, spacious design with neutral colors
gradientModern, colorful with gradient backgrounds
terminalHacker aesthetic with dark, monospace styling
brutalistBold, geometric with high contrast
keynoteProfessional, polished with classic feel

See Themes for detailed descriptions and examples.

aspectRatio

Slide aspect ratio. Defines the width-to-height ratio of your slides.

PropertyValue
Typestring
Default16/9
RequiredNo
Options16/9, 4/3, 21/9, custom (e.g., 3/2)
yaml
---
aspectRatio: 4/3
---

Common aspect ratios:

RatioUse Case
16/9Modern widescreen (default)
4/3Traditional/legacy projectors
21/9Ultra-wide displays

TIP

Most modern projectors and displays use 16:9. Use 4:3 only if you know your venue has older equipment.

Animations and Transitions

transition

Default slide transition animation applied when advancing between slides.

PropertyValue
Typestring
Defaultfade
RequiredNo
Optionsnone, fade, slide, push, zoom
yaml
---
transition: slide
---

Transition types:

TransitionEffect
noneInstant switch, no animation
fadeCrossfade between slides
slideSlide horizontally (left to right)
pushNew slide pushes old slide out
zoomZoom in/out effect

Individual slides can override this using the transition directive. See Animations & Transitions.

fragments

Enable automatic fragment reveals for list items. When enabled, bullet points appear one at a time as you advance.

PropertyValue
Typeboolean
Defaultfalse
RequiredNo
yaml
---
fragments: true
---

When true, all bullet lists in the presentation will reveal incrementally. Individual slides can override this with the fragments directive.

See Animations & Transitions for more on fragments and the <!-- pause --> directive.

Code Display

codeTheme

Syntax highlighting theme for code blocks. Uses Shiki themes.

PropertyValue
Typestring
DefaultTheme-dependent
RequiredNo
yaml
---
codeTheme: github-dark
---

Popular code themes:

ThemeStyle
github-darkGitHub's dark mode colors
github-lightGitHub's light mode colors
nordArctic, bluish color palette
draculaPopular dark theme
one-dark-proAtom One Dark colors
monokaiClassic dark theme
min-lightMinimal light theme

TIP

Each presentation theme sets a sensible default code theme. Only override if you want a specific look.

codeFontSize

Font size for code blocks. Adjust for readability at presentation distance.

PropertyValue
Typestring (CSS value)
Default16px
RequiredNo
yaml
---
codeFontSize: 14px
---

Recommended sizes:

SizeUse Case
18pxLarge venue, few lines of code
16pxDefault, standard presentations
14pxMore code on screen
12pxDense code, close viewing

Live Code Execution

drivers

Configure live code execution drivers. Each driver connects to a different backend for running code during presentations.

PropertyValue
Typeobject
DefaultNone
RequiredNo (only for live code execution)
yaml
---
drivers:
  sqlite:
    database: ./data/demo.db
  postgres:
    host: localhost
    port: 5432
    database: analytics
    user: $PGUSER
    password: $PGPASSWORD
  shell:
    cwd: ./scripts
    timeout: 30
---

Available drivers:

DriverDescription
sqliteSQLite database queries
mysqlMySQL/MariaDB database queries
postgresPostgreSQL database queries
shellShell/Bash command execution

WARNING

Live code execution only works with tap dev. Static builds (tap build) do not execute code.

Environment variables: Values starting with $ are replaced with environment variables. Never hardcode passwords in your files.

See Drivers Reference for complete driver configuration options.

Complete Example

Here's a comprehensive frontmatter example using multiple options:

yaml
---
title: Database Architecture Deep Dive
author: Jane Developer
date: 2024-03-15
theme: terminal
aspectRatio: 16/9
transition: fade
fragments: true
codeTheme: github-dark
codeFontSize: 14px
drivers:
  sqlite:
    database: ./demo.db
  postgres:
    host: localhost
    database: analytics
    user: $PGUSER
    password: $PGPASSWORD
    timeout: 30
---

Quick Reference

OptionTypeDefaultDescription
titlestringFile namePresentation title
authorstringNoneAuthor name
datestringNonePresentation date
themestringminimalVisual theme
aspectRatiostring16/9Slide aspect ratio
transitionstringfadeDefault slide transition
fragmentsbooleanfalseAuto-reveal list items
codeThemestringTheme defaultSyntax highlighting theme
codeFontSizestring16pxCode block font size
driversobjectNoneLive code execution config

Next Steps