Why are block patterns important?
In classic themes, we have templates — that more or less correspond to different pages —, and template parts — that allow for parts to be used in different templates.
In block themes, we have the blocks, and also the same templates and template parts. In addition, we have block patterns. In short, a block pattern is a predefined group of blocks, used to create a specific layout.
For example, in the WordPress' Block Pattern Directory you can find several block patterns for pricing tables, which is a common layout for showing different options or levels when buying or subscribing to some service, with the price and key features of each one, side by side.
If block patterns are a part of an interface, are they not the same as template parts? The main difference is that template parts are created for a specific theme, but block patterns are designed to be reusable in any theme.
Block patterns are not independent entities like plugins are. When inserting a block pattern into our site, the styles and options of our theme will bleed into the pattern. A block pattern can only carry the styles that can be added as attributes to the blocks.
They are meant to be customised and customisable.
领英推荐
WordPress encourages the use of block patterns. Using the Theme Check plugin on the NewDev theme, there is a recommendation for using block patterns within my theme.
I guess we have to account for how parts of our theme would work on their own and how different it is from other themes in terms of layout and block use.
Having two themes with the same basic structure and layout, but different colours, sizes, spacing, or typefaces was a common occurrence with classic themes. It does not make much sense with block themes.
But creating some reusable pattern can make it spread across sites with different themes.
I am eager to see how this translates to themes, patterns, and blocks design from now on because I can not make a prediction.