Overview
SlideDeck is the main provider component that wraps your slides layout. It provides keyboard navigation, ViewTransition animations, progress UI, an optional exit button, and presenter sync capabilities.
Place this component in your slides layout (e.g. app/slides/layout.tsx).
Important: SlideDeck must be the direct child of the layout (no wrapper div) for the deck-unveil exit animation to work correctly.
Props
Array of slide components to display in the deck.
The current slide’s content (typically passed from the layout).
Base path for slide URLs. Use this when you have multiple decks or non-standard routing.
URL to navigate to when exiting the deck. When set, shows an × button in the top-right corner.
Show progress dots at the bottom of the viewport.
Show slide counter (e.g. “3 / 10”) in the bottom-right corner.
API endpoint for presenter ↔ phone sync. When set, POSTs the current slide on navigation for
SlideNotesView to poll. See the sync route handlers documentation.Speaker notes per slide (same index as slides array). Use
parseSpeakerNotes() to load from a markdown file.Additional className for the deck container. Useful for applying custom styling or font classes to specific decks.
Features
- Keyboard navigation — Arrow keys and Space to navigate slides
- ViewTransition animations — Slide-in/out with directional awareness
- Progress UI — Dots and a counter at the bottom of the viewport
- Exit button — When
exitUrlis set, shows an × in the top-right corner - Presenter sync — When
syncEndpointis set, POSTs the current slide on navigation