controls prop.
The controls prop
Thecontrols prop accepts a boolean or a granular configuration object:
true, which enables all controls. Set controls={false} to disable every control across all block types.
Table controls
Tables rendered from GFM syntax gain three controls in the top-right corner:Copy
Opens a dropdown menu with three copy formats:- Markdown — copies the table in pipe-separated Markdown syntax
- CSV — comma-separated values for spreadsheet import
- TSV — tab-separated values
Download
Opens a dropdown with two download formats:- CSV — ready for Excel, Google Sheets, etc.
- Markdown — portable documentation format
Fullscreen
Opens the table in a modal overlay for easier reading of wide tables. Close with Escape or by clicking the backdrop.Configuring table controls
Code block controls
Code blocks display controls in the top-right corner on hover.Copy
Copies the raw code content (without syntax highlighting spans). Shows a checkmark for 2 seconds on success. Disabled whileisAnimating={true} to prevent copying incomplete code.
Download
Downloads the code as a plain text file. The file extension is inferred from the language identifier — for example, atypescript block downloads as file.ts.
Configuring code block controls
Mermaid diagram controls
When the@streamdown/mermaid plugin is active, diagram blocks gain four controls:
Copy
Copies the raw Mermaid source code for easy sharing and editing.Download
Downloads the rendered diagram as an SVG file nameddiagram.svg.
Fullscreen
Opens the rendered diagram in a modal overlay. Useful for complex diagrams that need more space. Close with Escape or by clicking outside.Pan and zoom
Enables interactive panning and zooming inside the diagram container. Users can scroll to zoom and drag to pan for detailed inspection of large diagrams.Configuring Mermaid controls
Disabling all controls
Disabling controls during streaming
Copy and download buttons are automatically disabled whenisAnimating={true}. This prevents users from copying incomplete content while a response is still generating.
Custom icons
Replace any icon in the controls UI using theicons prop. Pass a partial IconMap — only the icons you provide override the defaults.
The
icons prop accepts React nodes keyed by control name. The full list of overridable icon names is defined in the IconMap type exported from streamdown.Translations
All control labels and ARIA text are localizable via thetranslations prop:
