Stat Box

A simple way to show a quick stat and description with an optional icon.


You can view a live preview or take a look at the code required for this pattern. When viewing the code, you can copy it so that you can then paste it into your own site. Below the preview/code, you’ll see instructions on how to use block patterns on CMS.

Live Preview
OpenClose

1,250

Domain Mapped
Sites

Code
OpenClose
<!-- wp:group {"style":{"color":{"background":"#193056"},"spacing":{"padding":{"top":"2em","right":"2em","bottom":"2em","left":"2em"}},"border":{"radius":"0.75em"},"dimensions":{"minHeight":"15em"}},"textColor":"white","className":"","layout":{"type":"flex","orientation":"vertical","justifyContent":"center","verticalAlignment":"center"}} -->
<div class="wp-block-group has-white-color has-text-color has-background" style="border-radius:0.75em;background-color:#193056;min-height:15em;padding-top:2em;padding-right:2em;padding-bottom:2em;padding-left:2em"><!-- wp:paragraph {"align":"center","textColor":"white","fontSize":"large"} -->
<p class="has-text-align-center has-white-color has-text-color has-large-font-size"><i class="icon fa fa-desktop" aria-hidden="true"> </i> <strong>1,250</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"center","style":{"typography":{"letterSpacing":"0.05em","textTransform":"uppercase"}},"textColor":"white"} -->
<p class="has-text-align-center has-white-color has-text-color" style="letter-spacing:0.05em;text-transform:uppercase">Domain Mapped <br>Sites</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->

Prerequisites

There are no prerequisites to use this block pattern. You can copy and paste this code into your site and it should work immediately.

If you would like the icon you will need the JVM Rich Text Icons plugin active on your site.

Switch between the live preview and the code view to see what this might look like on your site and how to get it there

Available on every CMS website

How do I use block patterns on my site on CMS?

Block Patterns in WordPress are HTML with CSS (provided by special HTML comments). That means you’re able to simply copy a block (or selection of blocks) from one place, and paste them somewhere else, and they should look identical. In order to get the above block pattern on your site, try the following:

  1. Click the ‘Code’ tab above
  2. Click the ‘Copy to Clipboard’ icon in the top right of the code that is shown
  3. On your own site, add a new paragraph block to a post or a page
  4. Paste (ctrl+v on Windows, cmd+v on macOS) what you have on your clipboard
  5. Done!

alternative options

Here are some block patterns similar to this one

  • 3-column stats

    Stylized stats split across three columns on a desktop, collapsing to one column on smaller screens. As first seen on https://med.ubc.ca


  • Stat Highlight

    A stylized way to show a number and some text. Perhaps as a statistic, or a title for a post in an archive.