BetaUnder active development — content may be incomplete or change without notice.
Consistent naming keeps your block library scalable, predictable, and easy to navigate. As your project grows, following these conventions helps avoid conflicts and makes blocks easier to reuse.
When you add a block in Blok0, it includes only two essential files:
| File | Purpose |
|---|---|
config.ts | Defines the Payload CMS block configuration (admin fields) |
component.tsx | React component used to render the block |
Blok0 may include additional files like
previews.tsxordocumentation.mdxinternally, but you do not need to copy them into your project.
To keep your blocks organized, group them by category:
src/blocks/
├── heros/
│ ├── hero-1/
│ │ ├── config.ts
│ │ └── component.tsx
│ └── hero-2/
│ ├── config.ts
│ └── component.tsx
├── features/
│ └── feature-1/
│ ├── config.ts
│ └── component.tsxkebab-case → hero-1, feature-2kebab-case → heros, features, faqsThis structure ensures clarity and scales cleanly as more blocks are added.
Blok0 uses consistent naming patterns so you can infer names without checking documentation.
| Element | Pattern | Example |
|---|---|---|
| Config export | [Name]Config (PascalCase) | Hero1Config |
| Config slug | [name]Config (camelCase) | hero1Config |
| Interface name | [Name]Type (PascalCase) | Hero1Type |
| Component | [Name]Component (PascalCase) | Hero1Component |
hero1Config) → used internally by Payload (blockType)Hero1Type) → TypeScript type definitionFor a block named Hero 1:
// config.ts
export const Hero1Config: Block = {
slug: 'hero1Config',
interfaceName: 'Hero1Type',
// ...
}// component.tsx
export default function Hero1Component(props: Hero1Type) {
return <div>{/* ... */}</div>
}Blocks in the same category are separate implementations, not variants.
hero-1 ≠ hero-2Using numbers instead of descriptive names:
hero-horizontal-large-image)Visual variations (e.g., with/without image, different CTAs) are handled within a block, not by creating new block names.
Blok0 will support third-party block sources using prefixes:
ace-hero-1 → Aceternity UImui-cta-1 → Magic UIBlok0 naming is built around:
Stick to these conventions, and your block system will stay clean and maintainable.
Build Faster with Blok0 ProBlok0 - PayloadCMS
Follow the journey, request new blocks, and stay updated with the latest releases for Blok0 Payload CMS.
First look at new blocks