Business · Gutenberg
Stats Counter block for WordPress
Display animated number counters with icons, labels, and rich customization.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
Display animated number counters with icons, labels, and rich customization.
Inspector panels on this block: Layout, Icon, Number, Label, Card Style, Animation, Title, Stats Items. Those titles come from index.js, not from a shared template.
Behavior controls: “Layout Style” options: Grid, Inline, Stacked; “Text Align” options: Left, Center, Right; “Icon Position” options: Top, Left, Right; “Icon Style” options: Default (Icon only), Filled Background, Outlined.
Where to find it
Gutenberg inserter → Business → search “Stats Counter” (block name `blockenberg/stats-counter` in block.json). Style it in the sidebar after insert.
How to use Stats Counter block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Stats Counter”, insert it. Category: Business.
- Configure inspector controls that exist on this block. Open Layout. Set “Layout Style”, “Columns”, “Layout — Gap”, “Text Align”.
- Check the published page. The view script reads HTML data attributes: data-animate, data-card-shadow, data-card-style, data-duration, data-icon-position, data-icon-style, data-items, data-label-position. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Layout Style | Select control; the chosen value is saved on the block. Options: Grid; Inline; Stacked. block.json default: grid. Saved as `layoutStyle`. |
| Columns | Numeric range control in the inspector. Range 1–6. block.json default: 4. Saved as `columns`. |
| Layout — Gap | Numeric range control in the inspector. Range 0–80. block.json default: 32. Saved as `gap`. |
| Text Align | Select control; the chosen value is saved on the block. Options: Left; Center; Right. block.json default: center. Saved as `textAlign`. |
| Dividers between items | On/off toggle in the inspector. Off by default. Saved as `divider`. |
| Show Icon | On/off toggle in the inspector. On by default. Saved as `showIcon`. |
| Icon Position | Select control; the chosen value is saved on the block. Options: Top; Left; Right. block.json default: top. Saved as `iconPosition`. |
| Icon Style | Select control; the chosen value is saved on the block. Options: Default (Icon only); Filled Background; Outlined. block.json default: default. Saved as `iconStyle`. |
| Icon Size | Numeric range control in the inspector. Range 16–96. block.json default: 48. Saved as `iconSize`. |
| Background Size | Numeric range control in the inspector. Range 40–160. block.json default: 80. Saved as `iconBgSize`. |
| Border Radius | Numeric range control in the inspector. 50 = circle. Range 0–50. block.json default: 50. Saved as `iconRadius`. |
| Use item colors for icons | On/off toggle in the inspector. On by default. Saved as `useItemColors`. |
| Number Weight | Select control; the chosen value is saved on the block. Options: 400; 500; 600; 700; 800; 900. block.json default: 700. Saved as `numberWeight`. |
| Thousands Separator | Select control; the chosen value is saved on the block. Options: Comma (1,000); Space (1 000); Period (1.000); None (1000). block.json default: ,. Saved as `separator`. |
| Show Label | On/off toggle in the inspector. On by default. Saved as `showLabel`. |
| Label Position | Select control; the chosen value is saved on the block. Options: Below Number; Above Number. block.json default: below. Saved as `labelPosition`. |
| Label Weight | Select control; the chosen value is saved on the block. Options: 400; 500; 600; 700; 800; 900. block.json default: 400. Saved as `labelWeight`. |
| Enable Card Style | On/off toggle in the inspector. Off by default. Saved as `cardStyle`. |
| Card Style — Padding | Numeric range control in the inspector. Range 8–80. block.json default: 32. Saved as `cardPadding`. |
| Border Radius (Card Radius) | Numeric range control in the inspector. Range 0–40. block.json default: 12. Saved as `cardRadius`. |
| Card Style — Border | On/off toggle in the inspector. On by default. Saved as `cardBorder`. |
| Border Width | Numeric range control in the inspector. Range 1–6. block.json default: 1. Saved as `cardBorderWidth`. |
| Card Style — Shadow | On/off toggle in the inspector. Off by default. Saved as `cardShadow`. |
| Animate on Scroll | On/off toggle in the inspector. Numbers count up when visible on the page. On by default. Saved as `animateOnScroll`. |
| Animation Duration (ms) | Numeric range control in the inspector. Range 500–5000. block.json default: 2000. Saved as `animationDuration`. |
| Show Title | On/off toggle in the inspector. Off by default. Saved as `showTitle`. |
| Number | Text field in the inspector. |
| Prefix | Text field in the inspector. |
| Suffix | Text field in the inspector. |
| Label | Text field in the inspector. |
| Number Color | Color control in the inspector. block.json default: #1f2937. Saved as `numberColor`. |
| Label Color | Color control in the inspector. block.json default: #6b7280. Saved as `labelColor`. |
| Title Color | Color control in the inspector. block.json default: #1f2937. Saved as `titleColor`. |
| Card Background | Color control in the inspector. block.json default: #ffffff. Saved as `cardBg`. |
| Card Border Color | Color control in the inspector. block.json default: #e5e7eb. Saved as `cardBorderColor`. |
| Divider Color | Color control in the inspector. block.json default: #e5e7eb. Saved as `dividerColor`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-animate, data-card-shadow, data-card-style, data-duration, data-icon-position, data-icon-style, data-items, data-label-position.
- An IntersectionObserver starts work when the block enters the viewport.
When this is the right block
- Display animated number counters with icons, labels, and rich customization — that is the job of Stats Counter, not a generic content block.
- Use it when you need the editor control labeled “Layout Style”, which exists on this block’s inspector.
- It matches pages about stats, counter, number.
- Inserter grouping: company, service, and operations pages.
Notes from the implementation
viewScript: this folder’s frontend.js is enqueued on the front end for this block.
FAQ
How do I add the Stats Counter block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Stats Counter”. It sits under Business. After insert, open Layout and set “Layout Style”, “Columns”, “Layout — Gap”, “Text Align”.
What makes Stats Counter different from other Blockenberg blocks?
Display animated number counters with icons, labels, and rich customization. Inspector labels on this block include “Layout Style”, “Columns”, “Layout — Gap”, “Text Align”.
Is the Stats Counter Gutenberg block free?
Yes. Stats Counter ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Stats Counter to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Layout, Icon, Number, Label).
Related business blocks
Stats Section
A landing-page statistics section — large numbers with labels, icons, optional section heading, and multiple layout/style variants.
Certificate
Display a digital certificate or diploma with recipient name, issuer, date, credentials, and optional signatures. Ideal for online courses and certifications.
KPI Tiles
Metric tiles grid with numbers, labels, trend indicators and mini sparkline charts.
Metric Cards
KPI / dashboard metric cards with trend indicators (up/down arrow + percentage change) and an optional mini sparkline. Different from Stats Counter — these show change-over-time context.
Social Stats
Social media platform stats — display follower counts, subscriber milestones and engagement metrics with platform-branded icons (Instagram, YouTube, TikTok, LinkedIn, X/Twitter, Facebook, Pinterest).
About Section
Ready-made About Us section with split image/video + text layout, optional company stats row, badge label, CTA buttons, and full background/color controls.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Stats Counter from the Gutenberg inserter.