Markdown Text
vinkas-ui/markdown-textFreeComponent
A text view that renders beautiful Typeset styled HTML from Markdown
Live preview
live · rendered by the registry
Rendered by vinkas-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.vinkas.com/r/markdown-text.jsonSource
1import markdownit from "markdown-it"2import { cn } from "@/lib/utils"3import { ComponentProps } from "react"45const md = markdownit()67type MarkdownTextProps = {8 text: string,9 className?: string,10} & ComponentProps<"div">1112export default function MarkdownText({13 text,14 className,15 ...props16}: MarkdownTextProps) {17 const html = md.render(text)18 return (19 <div dangerouslySetInnerHTML={{ __html: html }} className={cn("typeset", className)} {...props} />20 )21}
What it pulls in
npm packages
Files it writes
More from vinkas-ui
All 7 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Copyright Textcopyright-text | vinkas-ui | Components | Free | no deps | |
| Input Copyableinput-copyable | vinkas-ui | Components | Free | 1 dep | |
| Relative Timerelative-time | vinkas-ui | Components | Free | no deps · 2 files | |
| UTM Linkutm-link | vinkas-ui | Components | Free | no deps |
