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
| Option | Type | Description |
|---|---|---|
format | 'slidev' | 'marp' | 'reveal' | Output format |
slides | number | Number of slides |
style | string | Visual style |
includeNotes | boolean | Include speaker notes |
duration | string | Presentation 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?