Primitives.org.ai

slides

Generate markdown-based presentations

Generate markdown-based presentations (Slidev, Marp, reveal.js).

Import

import { slides } from 'ai-functions'

Syntax

slides`topic`
slides`topic`(options)
slides(topic: string, options?: SlideOptions)

Examples

// Quick presentation
const deck = await slides`${topic}`

// With structure
const pitch = await slides`investor pitch for ${{ brand, market, traction }}`

// With options
const presentation = await slides('quarterly review', {
  format: 'slidev',
  slides: 12,
  style: 'minimal',
})

// With speaker notes
const workshop = await slides`TypeScript workshop${{
  format: 'marp',
  includeNotes: true,
  duration: '2 hours',
}}`

Options

OptionTypeDescription
format'slidev' | 'marp' | 'reveal'Output format
slidesnumberNumber of slides
stylestringVisual style
includeNotesbooleanInclude speaker notes
durationstringPresentation duration

From Research

const research = await research`AI market trends 2025`
const analysis = await lists`key insights from ${research}`

const deck = await slides`executive presentation${{
  research,
  analysis,
  audience: 'board of directors',
}}`

Output Formats

// Slidev (Vue-based)
const slidev = await slides`topic`({ format: 'slidev' })

// Marp (Markdown-based)
const marp = await slides`topic`({ format: 'marp' })

// reveal.js
const reveal = await slides`topic`({ format: 'reveal' })
Was this page helpful?

On this page