Skip to content
Sign in
WritingDeck generatorMenu

Deck generatorPro

Outline to slides, drafted one by one, with themes, per slide layouts, regenerate and export.

ProGenerate a ten slide board deck from its outline, then theme, relayout, redraft and export.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/deck-generator

Usage

tsx
import { DeckGenerator } from "@/components/ui/chatcn/pro/deck-generator"

<DeckGenerator
  title="A second café on Mill Lane"
  outline={outline}
  slides={slides}
  draftingId={draftingId}
  status={status}
  onRegenerate={(id) => redraft(id)}
  onExport={(format, progress) => exportDeck(format, progress)}
/>

Feed slides as the model writes them, keyed by outline id; partial slides are fine and the caret follows the last field that arrived. The line being drafted lights in the outline, the stage follows it until someone picks a slide, and each slot in the filmstrip fills as its slide lands. Slides are typeset in container units, so the stage, the filmstrip and DeckSlideView (exported for your own exports and previews) all render the same slide at any size.

Examples

Themes

ProThe same deck in Paper, Contrast, Serif and Signal, typeset in container units.

States

ProOutline before drafting, mid draft, a slide being redrafted, a failed slide and a short deck.

Props

PropTypeNotes
titlestringDeck title, also in each slide footer
outline{ id, title }[]One entry per slide, in order
slidesRecord<string, DeckSlide>Drafted slides by outline id; partial is fine
draftingIdstringThe slide being written now
regeneratingIdsstring[]Slides being redrafted
errorsRecord<string, string>Slides that failed, with how to fix it
status"outline" | "generating" | "done" | "error"Default done
theme, defaultTheme, onThemeChange"paper" | "contrast" | "serif" | "signal"Deck theme
selectedId, defaultSelectedId, onSelectedChangestringSlide on the stage
onLayoutChange(id, layout) => voidShows the layout picker
onRegenerate(id) => voidShows Regenerate slide
onExport(format, progress) => Promise<{ name, size?, href? }>PDF or PowerPoint, with progress
onGenerate() => voidGenerate slides, while status is outline

Keyboard

KeyAction
TabOutline, theme, layout picker, then the filmstrip
Left and Right arrowsPrevious or next slide in the filmstrip
Home and EndFirst or last slide

Accessibility

  • The filmstrip is a listbox; each slide is an option named by its number and title.
  • The status line under the title is a polite live region: drafting progress and the slide count.
  • Theme and layout pickers are toggle groups with labelled options; layouts read their name, not the drawing.
  • Export progress is announced as it runs; failures say how to fix them.

Motion

New slides fade and settle into their filmstrip slot over 200 ms; text streams in with no per word effects. The outline line being drafted carries a still accent bar, never a pulse. Export progress fills by transform. Reduced motion keeps the fades only.