Translations
Basic usage
Pass a partial translations object to thetranslations prop. Any key you omit falls back to the built-in English default:
app/page.tsx
Available translation keys
Code blocks
Tooltip for the copy button on code blocks.
Tooltip for the download button on code blocks.
Mermaid diagrams
Label for the diagram download dropdown button.
Download-as-SVG menu option.
Download-as-PNG menu option.
Download-as-MMD menu option.
Toggle-fullscreen button label.
Exit-fullscreen button label.
Short format label used inside the download dropdown.
Short format label used inside the download dropdown.
Short format label used inside the download dropdown.
Tables
Label for the table copy button.
Copy-as-Markdown menu option.
Copy-as-CSV menu option.
Copy-as-TSV menu option.
Label for the table download button.
Download-as-CSV menu option.
Download-as-Markdown menu option.
Short format label used inside the download dropdown.
Short format label used inside the download dropdown.
Short format label used inside the download dropdown.
Images
Fallback text shown when an image fails to load.
Tooltip for the image download button.
Link modal
Title of the link-safety confirmation modal.
Body text in the link-safety modal.
Close button label in the link-safety modal.
Copy-link button label in the link-safety modal.
Confirmation label shown after a successful copy action.
Confirm-and-open button label in the link-safety modal.
Accessing translations in custom components
TheuseTranslations hook reads the active translations object inside any component rendered within a <Streamdown> tree. Use it in custom components to keep your labels consistent with the rest of the UI:
components/my-code-block.tsx
TypeScript types
streamdown:
StreamdownTranslations— interface with all translation keysdefaultTranslations— the built-in English defaults objectuseTranslations— React hook that returns the active translations
Icons
Streamdown uses a small set of SVG icons in its built-in controls. You can replace any icon with a custom component via theicons prop.
Usage
app/page.tsx
IconMap interface
Theicons prop accepts Partial<IconMap>. Any key you omit keeps the default icon.
| Key | Default icon | Where it appears |
|---|---|---|
CheckIcon | Check mark | After a successful copy action |
CopyIcon | Clipboard | Code block and table copy buttons |
DownloadIcon | Download arrow | Code block and table download buttons |
ExternalLinkIcon | External link arrow | Link-safety modal |
Loader2Icon | Spinning loader | Loading states |
Maximize2Icon | Expand arrows | Fullscreen toggle button |
RotateCcwIcon | Rotate counter-clockwise | Mermaid error retry button |
XIcon | Close X | Close button in link-safety modal |
ZoomInIcon | Magnifying glass + | Pan/zoom in on Mermaid diagrams |
ZoomOutIcon | Magnifying glass − | Pan/zoom out on Mermaid diagrams |
