Flat-Blocks
Production-ready WordPress blocks with Shadcn/Tailwind styling. Beautiful, responsive, and accessible by default.
Performance First
92% of blocks are Server Components with zero client JavaScript
Beautiful Design
Shadcn UI components with Tailwind CSS for modern aesthetics
Fully Accessible
WCAG 2.1 AA compliant with semantic HTML and ARIA labels
Block Library
12 core blocks ready to use in your Next.js + WordPress projects
Content Blocks
Typography and text formatting blocks for rich content
Paragraph
Responsive typography block with font sizing and drop cap support
Props:
content:stringHTML content
fontSize?:'small' | 'normal' | 'medium' | 'large' | 'x-large'Font size preset
dropCap?:booleanEnable drop cap on first letter
align?:'left' | 'center' | 'right' | 'justify'Text alignment
Example:
Live Preview:
Beautiful typography with proper line height and responsive sizing. The paragraph block adapts to different screen sizes automatically, ensuring readability on all devices. This example shows a large font size with a drop cap on the first letter.
Heading
H1-H6 headings with auto-generated anchor links for easy navigation
Props:
content:stringHeading text
level:1 | 2 | 3 | 4 | 5 | 6Heading level (h1-h6)
anchor?:stringCustom anchor ID
textAlign?:'left' | 'center' | 'right'Text alignment
Example:
Live Preview:
This is a Level 2 Heading
Hover over the heading above to see the anchor link. The anchor is auto-generated from the heading text for easy linking.
Quote
Beautiful blockquote with optional citation and two style variants
Props:
value:stringQuote content (HTML)
citation?:stringAuthor or source
style?:'default' | 'large'Visual style variant
align?:'left' | 'center' | 'right'Text alignment
Example:
Live Preview:
The only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle.
Code Blocks
Syntax-highlighted code display with advanced features
Code
Syntax highlighting with Shiki, copy button, and line numbers
Props:
content:stringCode content
language?:stringProgramming language (50+ supported)
fileName?:stringOptional filename header
showLineNumbers?:booleanShow line numbers
showCopyButton?:booleanShow copy button
highlightLines?:stringLines to highlight (e.g., "1,3-5")
Example:
Live Preview:
Code Tabs
Tabbed code blocks for showing multiple language examples
Props:
tabs:Array<{label: string; language: string; content: string}>Array of code tabs
showLineNumbers?:booleanShow line numbers
showCopyButton?:booleanShow copy button
Example:
Live Preview:
Media Blocks
Optimized image display and call-to-action buttons
Image
Optimized images with next/image, captions, and responsive sizing
Props:
url:stringImage URL
alt:stringAlt text for accessibility
caption?:stringImage caption
width?:numberImage width in pixels
height?:numberImage height in pixels
borderRadius?:'none' | 'sm' | 'md' | 'lg' | 'full'Border radius size
Example:
Live Preview:
Button
Call-to-action buttons with Shadcn UI variants and sizes
Props:
text:stringButton text
url:stringLink URL
variant?:'default' | 'secondary' | 'outline' | 'ghost' | 'link' | 'destructive'Button style
size?:'sm' | 'default' | 'lg'Button size
width?:'auto' | 'full'Button width
Example:
Buttons (Container)
Container for multiple buttons with layout and spacing control
Props:
layout?:'horizontal' | 'vertical'Button layout direction
align?:'left' | 'center' | 'right'Horizontal alignment
Example:
Live Preview:
Layout Blocks
Structure and spacing blocks for page layouts
Columns
Responsive grid system with 1-6 columns and mobile stacking
Props:
columns?:numberNumber of columns (1-6)
verticalAlignment?:'top' | 'center' | 'bottom'Vertical alignment
isStackedOnMobile?:booleanStack columns on mobile
Example:
Live Preview:
Column 1
Content goes here
Column 2
Content goes here
Column 3
Content goes here
Group
Container wrapper with semantic HTML and layout control
Props:
layout?:'default' | 'constrained' | 'full'Layout type
tagName?:'div' | 'section' | 'article' | 'aside'HTML tag to use
Example:
Live Preview:
This content is inside a constrained Group block with a background color. The max-width keeps content readable on large screens.
Separator
Horizontal divider with style variants
Props:
style?:'default' | 'wide' | 'dots'Separator style
opacity?:'default' | 'css'Opacity level
Example:
Live Preview:
Default style:
Wide style:
Dots style:
Spacer
Vertical spacing control with configurable height
Props:
height:string | numberHeight in pixels or rem
Example:
Live Preview:
Content above spacer
Content below spacer (64px gap)
Table
Responsive data tables with striped rows and horizontal scroll
Props:
head?:Array<{cells: Array<{content: string; tag: "th"}}}>Table header
body:Array<{cells: Array<{content: string; tag: "td"}}}>Table body
stripes?:booleanEnable striped rows
Example:
Live Preview:
| Block | Category | Server Component | Size |
|---|---|---|---|
| CoreParagraph | Content | ✅ Yes | 1.8KB |
| CoreHeading | Content | ✅ Yes | 3.6KB |
| CoreCode | Code | ✅ Yes | 5.8KB |
Cover
Full-width background section with image and overlay
Props:
url?:stringBackground image URL
alt?:stringAlt text
dimRatio?:numberOverlay opacity (0-100)
overlayColor?:stringOverlay color
minHeight?:numberMinimum height in pixels
contentPosition?:stringContent position (9 options)
Example:
Live Preview:
Cover Block
Full-width background with overlay and content positioning
Getting Started
Start using Flat-Blocks in your Next.js + WordPress project
Installation
Basic Usage
WordPress Integration
Ready to Build?
Start using Flat-Blocks in your project today. All blocks are production-ready, fully typed, and accessible.