Component overrides for react().
Replace default HTML tags with custom React components. Each override receives the same props the default element would get.
Search the reference...
/
interface
Component overrides for react().
Replace default HTML tags with custom React components. Each override receives the same props the default element would get.
function Code({ language, children }: { language?: string; children: React.ReactNode }) {
return pre data-language={language}>code>{children}code>pre>;
}
Bun.markdown.react(text, { pre: Code });
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →