Skip to content

<CodeStepper>

Progressive code reveal with line ranges and highlights.

NameTypeDefaultDescription
childrenstringSource code as a string child.
language?stringLanguage 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
}