sections
Stats Section
Section for key metrics and KPIs with nested stat items.
#stats#kpi#metrics#social-proof
Storyblok Schema
json
{
"$bloktastic": {
"version": "1.0.0"
},
"name": "stats_section",
"display_name": "Stats Section",
"is_root": false,
"is_nestable": true,
"schema": {
"headline": {
"type": "text",
"pos": 0,
"display_name": "Headline",
"description": "Optional section title"
},
"stats": {
"type": "bloks",
"pos": 1,
"display_name": "Stats",
"description": "Collection of stat item bloks",
"required": true,
"restrict_components": true,
"component_whitelist": [
"stat_item"
]
},
"alignment": {
"type": "option",
"pos": 2,
"display_name": "Alignment",
"default_value": "center",
"options": [
{
"name": "Left",
"value": "left"
},
{
"name": "Center",
"value": "center"
}
],
"description": "Text alignment strategy"
},
"columns": {
"type": "option",
"pos": 3,
"display_name": "Columns",
"default_value": "4",
"options": [
{
"name": "2 Columns",
"value": "2"
},
{
"name": "3 Columns",
"value": "3"
},
{
"name": "4 Columns",
"value": "4"
}
],
"description": "Desktop column count"
}
},
"preview_field": "headline"
} Generation Prompt
md
# Stats Section
## Purpose
Section for key metrics and KPIs with nested stat items.
## Storyblok Schema Fields
- `headline` (text): Optional section title
- `stats` (bloks, required): Collection of stat item bloks
- `alignment` (option): Text alignment strategy
- `columns` (option): Desktop column count
## Visual Requirements
- Design for responsive marketing pages (mobile, tablet, desktop).
- Keep spacing and hierarchy clear for conversion-focused sections.
- Support optional content gracefully without visual gaps.
## Accessibility
- Use semantic sectioning and heading structure.
- Ensure interactive elements are keyboard reachable with visible focus states.
- Maintain WCAG-compliant contrast in all supported styles.
## Example Props Structure
```typescript
interface StatsSectionProps {
// Map Storyblok fields to your frontend props here
}
```
## Edge Cases
- Missing optional media or links.
- Extremely long text content.
- Empty collections in nested blok fields.
README
md
# @bloktastic/stats-section
Section for key metrics and KPIs with nested stat items.
## Installation
```bash
bloktastic add @bloktastic/stats-section
```
## Fields
| Field | Type | Required | Description |
|---|---|---|---|
| headline | text | No | Optional section title |
| stats | bloks | Yes | Collection of stat item bloks |
| alignment | option | No | Text alignment strategy |
| columns | option | No | Desktop column count |
## Notes
- Category: `sections`
- Tags: `stats`, `kpi`, `metrics`, `social-proof`