Streamdown requires Tailwind CSS to style its output. You must ensure the Tailwind scanner includes the Streamdown distribution files. Failure to do this will result in missing styles.
Tailwind v4
Add the @source directive to your globals.css. Add a line for each plugin you have installed:
@source "../node_modules/streamdown/dist/*.js";
/* If using plugins, add them as well: */
@source "../node_modules/@streamdown/code/dist/*.js";
@source "../node_modules/@streamdown/cjk/dist/*.js";
@source "../node_modules/@streamdown/math/dist/*.js";
@source "../node_modules/@streamdown/mermaid/dist/*.js";
Tailwind v3
Add the path to the content array in your tailwind.config.js:
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx,mdx}",
"./node_modules/streamdown/dist/*.js",
],
};
@source "../node_modules/streamdown/dist/*.js";