Skip to content

<CodeStepper>

Progressive code reveal with line ranges and highlights. Each CodeStep is one slide step; the stepper registers its step count with the enclosing <Slide>.

NameTypeDefaultDescription
childrenstring—Source code as a string child.
language?string—Language for the highlighter.
highlighter?ComponentType<HighlighterProps>—Renderer — e.g. from useShikiHighlighter().
stepsCodeStep[]—Per-step lines / highlights / focus / annotations.

CodeStep shape:

interface CodeStep {
lines?: [number, number]
highlight?: number[]
focus?: [number, number]
annotation?: ReactNode
annotationLine?: number
}