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-faq

FAQ Block (Astro)

contentbit/astro-faq
FreeComponent

Accordion of question/answer pairs.

Install it

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

Source

src/astro/faq.astrocontentbit.dev/r/astro-faq.json
1---
2import type { FaqData, FaqItemData } from '@contentbit/blocks'
3import type { ValidatedBlockNode } from '@contentbit/core'
4import type { AstroBlockContext } from '@contentbit/astro'
5
6import { isValidatedBlock } from '@contentbit/core'
7
8interface Props {
9 node: ValidatedBlockNode<unknown>
10 ctx: AstroBlockContext
11}
12
13const { node, ctx } = Astro.props
14const data = node.data as FaqData
15const items = await Promise.all(
16 data.blocks.map(async (item) => ({
17 question: String(item.props.question),
18 html: await ctx.renderMarkdown(isValidatedBlock(item) ? (item.data as FaqItemData).markdown : item.body),
19 })),
20)
21
22// Inline lucide path: chevron-down.
23const CHEVRON = '<path d="m6 9 6 6 6-6"/>'
24
25// Native <details> means items open independently (the React pack's accordion
26// is single-open). Add name="faq" to the <details> elements for exclusivity.
27---
28
29<div data-cb-styled class="bg-card my-6 rounded-lg border px-4">
30 {
31 items.map((item, i) => (
32 <details class:list={['group', i < items.length - 1 && 'border-b']}>
33 <summary class="flex cursor-pointer list-none items-center justify-between gap-4 py-4 text-left text-sm font-medium [&::-webkit-details-marker]:hidden">
34 {item.question}
35 <svg
36 xmlns="http://www.w3.org/2000/svg"
37 viewBox="0 0 24 24"
38 fill="none"
39 stroke="currentColor"
40 stroke-width="2"
41 stroke-linecap="round"
42 stroke-linejoin="round"
43 class="text-muted-foreground size-4 shrink-0 transition-transform group-open:rotate-180"
44 aria-hidden="true"
45 set:html={CHEVRON}
46 />
47 </summary>
48 <div class="text-muted-foreground pb-4 text-sm leading-relaxed" set:html={item.html} />
49 </details>
50 ))
51 }
52</div>

What it pulls in

npm packages

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

Files it writes

  • src/astro/faq.astro

Facts

Registry
contentbit
Type
registry:component
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-13
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
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

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex