Build post blocks
Style the default post blocks with your brand, and add custom blocks for your editors.
Posts are made of blocks: paragraphs, headings, images, callouts, and so on. Editors pick them in the block editor, and your post page renders them. The Deco Blog app ships a default set, but its styling is generic. To make posts look like your brand, build your own blocks in your site.
Post blocks live in sections/Blog/Post/ (src/sections/Blog/Post/ on TanStack sites). The Site Editor offers every block in that folder when someone writes a post. They are listed first in the picker, under Custom blocks when the app's blocks are shown too. There are two kinds:
- Default blocks, which reuse the name and props of an app block, such as
Paragraph. They get the same editor as the app's block, with your styling. - Custom blocks, with any other name. They get a form built from their props.
Restyle a default block
Create a file with the same name as the app's block and the same props, and add your own markup and styles. The Site Editor recognizes the block by its file name and opens its usual editor — rich text for a paragraph, level and text for a heading — while your component renders it on the site.
For example, src/sections/Blog/Post/Paragraph.tsx:
import type { Props } from "@decocms/apps-blog/sections/blocks/Paragraph";
export type { Props };
export default function Paragraph({ html, text }: Props) {
return (
<p
className="font-serif text-lg leading-relaxed text-brand-ink mb-6 [&_a]:text-brand-accent [&_a]:underline"
dangerouslySetInnerHTML={{ __html: html ?? text ?? "" }}
/>
);
}Importing the Props type from the app keeps your block's props identical to the app's. On Deno sites, import it from apps/blog/sections/blocks/Paragraph.tsx.
These are the names and props the editors expect:
| Block (file name) | Shown in the picker as | Props |
|---|---|---|
Paragraph | Paragraph | html |
Heading | Heading | text, level |
List | List | items, style |
BlockImage | Image | url, mobileUrl, alt, caption, size, highPriority |
Video | Video | url, caption |
Quote | Quote | quote |
Callout | Callout | title, body, variant |
Code | Code | code, language |
Table | Table | headers, rows |
Checklist | Checklist | title, items |
Steps | Steps | title, steps |
Comparison | Comparison | left, right |
CardGroup | Card group | cards |
Stat, StatGroup | Stat, Stat group | value, label, description; stats |
Cta | Call to action | text, href |
Divider | Divider | — |
ProductCard, ProductShelf | Product card, Product shelf | Commerce sites only. Products chosen in the editor. |
A block with one of these names but different props won't load correctly in its editor.
To offer only your own blocks, an organization manager can turn on Hide the default blog blocks in the organization's general settings, under Blog blocks. Blocks already used in posts keep rendering.
Add a custom block
Any other file in sections/Blog/Post/ becomes a custom block. Its props define the form editors fill in:

import type { ImageWidget } from "@decocms/blocks/types/widgets";
/** @title Highlight */
export interface Props {
/** @title Text */
text: string;
/** @title Image */
image?: {
/** @title Image */
src: ImageWidget;
/** @title Alt text */
alt: string;
};
/** @title Items */
items?: { label: string; description?: string }[];
}@titlesets the label, and@descriptionadds help text below it. On the block itself, they set its name and description in the picker.@iconsets its icon.- Props without
?are required and show a marker until they're filled in (1). ImageWidgetgives an image upload (2). The same module also hasVideoWidget,RichText,TextArea, andColor.- Arrays become lists with Add item (3), and nested objects become groups.
Render the blocks on the post page
The post page's section decides which component renders each block. In the template, src/sdk/blog/blocks.tsx maps each block name to a component: DEFAULT_BLOCKS for the app's blocks and CUSTOM_BLOCKS for the ones in sections/Blog/Post/. When you add a block, register it in CUSTOM_BLOCKS; a block missing from the map doesn't render.
The template's post section also passes an id to headings and custom blocks for its table of contents. Add an optional id prop to blocks that should be linkable.
Implementation reference: blog-tanstack post blocks. Reviewed 2026-10-09.