Slides widget (Pro)
ProIncluded in $99A generated deck in the chat: slides arrive as they are written, then Present fills the screen and Export hands over an editable file.
On this page
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { SlidesWidget } from "@/components/ui/chatcn/pro/slides-widget"
<SlidesWidget
title="Q1 board update"
slides={[
{ kind: "title", title: "Q1 board update", subtitle: "Northwind · April 2026" },
{ kind: "stat", value: "$4.8M", caption: "Annual recurring revenue, up 31% on the quarter" },
{ kind: "chart", title: "New revenue by month", unit: "k", bars: [{ label: "Jan", value: 290 }, …] },
{ kind: "bullets", title: "Asks for the board", bullets: ["Approve the EU region in Q2", …] },
]}
total={8}
generating={streaming}
onExport={(format) => exportDeck(format)} // "pdf" | "pptx" | "gslides"
/>Slides are data, not pictures: title, bullets, stat, chart and quote slides render on a 16 by 9 canvas whose type is sized in container units, so a thumbnail and a projector show the same slide at different sizes, and an assistant can write them as JSON. While the deck is generating, total placeholders fill the filmstrip, slides drop in as they arrive, the view follows the newest one, and the header says which slide is being written; Present and Export wait until it is done. Present fills the screen in black: arrows, space, Page Up and Down or a click move through it, and Escape returns to the chat with focus on Present. Export lists the formats and shows progress, and a failure says so under the deck. The deck keeps its own light or dark look (deckTheme), whatever the chat theme.
Examples
States
Props
| Prop | Type | Notes |
|---|---|---|
title | string | The deck's name |
slides | Slide[] | title, bullets, stat, chart or quote slides |
total, generating | number, boolean | Placeholders and progress while writing |
deckTheme | "light" | "dark" | The deck's own look |
formats, onExport | Export menu; throw to show the error | |
labels | Partial<SlidesWidgetLabels> | Every string, for translation |
Keyboard
| Key | Action |
|---|---|
| Arrow left, right in the filmstrip | Previous or next slide |
| Arrows, Space, Page Up, Page Down while presenting | Move through the deck |
| Escape | Stop presenting |
Accessibility
- Thumbnails are buttons named Slide 2 of 8, in a toolbar with one tab stop; the current one is marked.
- Presenting is a modal dialog named with the slide number, with focus returned on exit.
Motion
New slides and the current slide rise in over 220 to 260 ms. Under reduced motion they appear in place.