BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/contentbit/content-renderer

Content Renderer

contentbit/content-renderer
FreeComponent

Renders a validated Content Blocks document with the styled component pack.

Install it

npx shadcn@latest add https://contentbit.dev/r/content-renderer.json

Source

src/blocks/content-renderer.tsxcontentbit.dev/r/content-renderer.json
1import type { ProcessedDocumentNode } from '@contentbit/core'
2import type { ReactNode } from 'react'
3
4import { genericBlockDefinitions } from '@contentbit/blocks'
5import { ContentBlocks, defineBlockComponents, type BlockComponent } from '@contentbit/react'
6
7import { CalloutBlock } from './callout'
8import { ComparisonBlock } from './comparison'
9import { FaqBlock } from './faq'
10import { KeyMetricsBlock } from './key-metrics'
11import { ProsConsBlock } from './pros-cons'
12import { QuickRefBlock } from './quick-ref'
13import { StepsBlock } from './steps'
14import { TabsBlock } from './tabs-block'
15
16export const styledComponents = defineBlockComponents(genericBlockDefinitions, {
17 callout: CalloutBlock,
18 steps: StepsBlock,
19 'key-metrics': KeyMetricsBlock,
20 'quick-ref': QuickRefBlock,
21 comparison: ComparisonBlock,
22 'pros-cons': ProsConsBlock,
23 tabs: TabsBlock,
24 faq: FaqBlock,
25})
26
27export interface ContentRendererProps {
28 document: ProcessedDocumentNode
29 /** Plug your app's Markdown pipeline here. Defaults to plain paragraphs. */
30 renderMarkdown?: (md: string) => ReactNode
31 components?: Record<string, BlockComponent>
32}
33
34export function ContentRenderer({ document, renderMarkdown, components }: ContentRendererProps) {
35 return (
36 <ContentBlocks
37 document={document}
38 components={{ ...styledComponents, ...components }}
39 renderMarkdown={renderMarkdown}
40 />
41 )
42}

What it pulls in

npm packages

  • @contentbit/core
  • @contentbit/blocks
  • @contentbit/react

Other registry items

  • @contentbit/callout
  • @contentbit/steps
  • @contentbit/key-metrics
  • @contentbit/quick-ref
  • @contentbit/comparison
  • @contentbit/pros-cons
  • @contentbit/tabs
  • @contentbit/faq

Files it writes

  • src/blocks/content-renderer.tsx

Facts

Registry
contentbit
Type
registry:component
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-04
Last confirmed
today

Go to the source

contentbit.dev agonist/contentbit on GitHub Raw registry item This item as JSON

More from contentbit

All 20 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Callout Block (Astro)astro-calloutcontentbitComponentsFree3 deps
Comparison Block (Astro)astro-comparisoncontentbitComponentsFree3 deps
Content Renderer (Astro)astro-content-renderercontentbitComponentsFree3 deps
FAQ Block (Astro)astro-faqcontentbitComponentsFree3 deps
Key Metrics Block (Astro)astro-key-metricscontentbitComponentsFree3 deps
Pros & Cons Block (Astro)astro-pros-conscontentbitComponentsFree3 deps
Quick Reference Block (Astro)astro-quick-refcontentbitComponentsFree3 deps
Steps Block (Astro)astro-stepscontentbitComponentsFree3 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex