Skip to content

Writing Slides

Layouts

@react-slides/components ships layout primitives. Pass one as layout on <Slide> or use it directly inside slide content.

Available: CenteredLayout, TwoColumnLayout, SplitLayout, TitleLayout, SectionLayout, StackLayout. See the components docs.

Code reveals

CodeStepper shows a snippet and reveals or highlights lines step by step. Pair with useShikiHighlighter() from @react-slides/plugin-shiki.

For side-by-side snapshot comparisons use CodeDiff instead.

Diagrams

DiagramStepper orchestrates region visibility for SVGs (and Mermaid via MermaidAdapter).

For Mermaid charts: pass a MermaidAdapter as the child and map node IDs via regionMap.

Animations

Replace Fragment with MotionFragment from @react-slides/plugin-motion for Framer Motion animations.

Speaker notes

Pass notes to a <Slide> for presenter view.

import { Slide } from '@react-slides/core'
const slides = () => {
return (
<>
<Slide notes="Remember to mention the migration deadline.">
<h1>Migration plan</h1>
</Slide>
</>
)
}
export default slides

The <SpeakerView> component (from @react-slides/viewer) reads notes from the synced state when paired with presenterMode().