BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/contentbit/astro-content-renderer

Content Renderer (Astro)

contentbit/astro-content-renderer
FreeComponent

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

Install it

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

Source

src/astro/content-renderer.astrocontentbit.dev/r/astro-content-renderer.json
1---
2import type { ProcessedDocumentNode } from '@contentbit/core'
3import type { ComponentProps } from 'astro/types'
4
5import { ContentBlocks } from '@contentbit/astro/components'
6
7import Callout from './callout.astro'
8import Comparison from './comparison.astro'
9import Faq from './faq.astro'
10import KeyMetrics from './key-metrics.astro'
11import ProsCons from './pros-cons.astro'
12import QuickRef from './quick-ref.astro'
13import Steps from './steps.astro'
14import Tabs from './tabs.astro'
15
16// The styled pack, keyed by block name. Add your custom blocks via the
17// `components` prop — they merge over these.
18const styledComponents: Record<string, unknown> = {
19 callout: Callout,
20 steps: Steps,
21 'key-metrics': KeyMetrics,
22 'quick-ref': QuickRef,
23 comparison: Comparison,
24 'pros-cons': ProsCons,
25 tabs: Tabs,
26 faq: Faq,
27}
28
29interface Props {
30 document: ProcessedDocumentNode
31 components?: Record<string, unknown>
32 /**
33 * Host prose pipeline for Markdown between block islands and nested block
34 * children. Pass your Astro/Satteri renderer here if the rest of your site
35 * uses Astro's Markdown processor.
36 */
37 renderMarkdown?: ComponentProps<typeof ContentBlocks>['renderMarkdown']
38 onInvalid?: 'strict' | 'annotated' | 'fallback'
39}
40
41const { document, components, renderMarkdown, onInvalid } = Astro.props
42---
43
44<ContentBlocks
45 document={document}
46 components={{ ...styledComponents, ...components }}
47 renderMarkdown={renderMarkdown}
48 onInvalid={onInvalid}
49/>

What it pulls in

npm packages

  • @contentbit/core
  • @contentbit/blocks
  • @contentbit/astro

Other registry items

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

Files it writes

  • src/astro/content-renderer.astro

Facts

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

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
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
Tabs Block (Astro)astro-tabscontentbitComponentsFree3 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