All three adapters share the same presentation options. React passes Markdown as children, Vue as markdown, and the DOM adapter as the first argument to update().
Shared options
| Option | Type | Default | Description |
|---|---|---|---|
receiving | boolean | false | Whether this snapshot may still grow. See Streaming a response. |
mode | "streaming" | "static" | "streaming" | Pace a live answer, or render completed Markdown immediately. |
reveal | "character" | "word" | "character" | How flowing text enters. See Reveal and timing. |
interval | number | 3 | Base cadence between presentation units, in milliseconds. |
duration | number | 1000 | Entrance duration in milliseconds for text and related motion. |
reducedMotion | "system" | "always" | "never" | "system" | Reduced-motion policy. Independent of mode. |
unstyled | boolean | false | Drop the default prose theme. Functional reveal CSS stays. |
codeHighlighter | CodeHighlighter | — | Optional highlighter from @smoothstream/code or a custom implementation. |
interval and duration must be finite, non-negative numbers. Zero is allowed. Use reducedMotion to control motion policy and mode to choose immediate presentation of completed content.
Adapter surfaces
Exported TypeScript names: SmoothstreamProps (React, Vue), SmoothstreamComponentName and SmoothstreamComponents (React, Vue), SmoothstreamComponentProps<Name> (React), SmoothstreamOptions, SmoothstreamUpdateOptions, and SmoothstreamController (DOM), plus SmoothstreamMode, SmoothstreamReducedMotion, and SmoothstreamReveal.
createCodeHighlighter
Import { codeHighlighter, createCodeHighlighter } from @smoothstream/code. codeHighlighter is createCodeHighlighter() with defaults.
| Option | Type | Default | Description |
|---|---|---|---|
theme | bundled Shiki theme name | "github-light" | Single theme. Mutually exclusive with themes. |
themes | { light, dark } | — | Paired bundled themes. Mutually exclusive with theme. |
defaultColor | "light" | "dark" | "light-dark()" | false | "light" | Shiki’s multiple-theme color strategy. Only with themes. |
showLanguageLabels | boolean | true | Language name above each fenced block. |
Pass the returned highlighter as codeHighlighter to any adapter. See Syntax highlighting.
Passing both theme and themes is rejected by TypeScript and throws at runtime for JavaScript callers. Unknown bundled theme names also throw. Unknown fence languages instead fall back to plain code with the selected theme’s palette.
For the CodeHighlighter request/result contract, see Custom highlighters. For visual theme controls, see CSS variables.