@stream-mdx/theme-tailwind
v0.3.0
Published
Optional Tailwind theme styles for StreamMDX streaming Markdown output
Readme
@stream-mdx/theme-tailwind
Optional Tailwind-friendly theme for StreamMDX output. This package ships a single CSS file with:
.markdown-v2-outputstreaming-specific layout tweaks.markdownbase Markdown typography helpers.proseadjustments (compatible with@tailwindcss/typography)
Install
npm install @stream-mdx/theme-tailwindUsage
Import the CSS after your Tailwind directives so the layers merge cleanly:
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "@stream-mdx/theme-tailwind/theme.css";Then apply the recommended structure:
import { StreamingMarkdown } from "stream-mdx";
export function Article({ content }: { content: string }) {
return (
<div className="prose markdown">
<StreamingMarkdown className="markdown-v2-output" text={content} />
</div>
);
}Notes
- If you want the
prosebase styles, install@tailwindcss/typographyand enable it intailwind.config.ts. - The theme references CSS variables like
--foregroundand--border; define them in your design system or replace them with your own values. - You can always override elements via StreamMDX
components,inlineComponents, andtableElements.
