hiip/ui

Components / Data

Markdown Preview

Markdown to syntax-highlighted HTML. Raw HTML in the source is escaped.

Install — needs @hiip registered in components.json

bunx shadcn@latest add @hiip/markdown-preview

Or by URL, with the token in the query

bunx shadcn@latest add "https://ui.hiip.ai/r/markdown-preview.json?token=$HIIP_REGISTRY_TOKEN"

Both need a token — set one up.

Anatomy

Import from components/ui/hiip-ui/markdown-preview.

<MarkdownPreview />

Examples

Rendering…

API Reference

Generated from the source. Props forwarded to the underlying element are not listed.

MarkdownPreview

PropTypeDefault
sourcerequiredstring
classNamestring | undefined
Type
registry:ui
npm packages
markdown-it @shikijs/markdown-it @tailwindcss/typography
Files written
  • components/ui/hiip-ui/markdown-preview.tsx
  • components/ui/highlight.ts