跳到内容

Zealblocks (Beta)

v0.0.3-beta

Aman Dubey · 2026年9月19日 上架

Text, Button, Icon and Buttons blocks built on WordPress 7.1: per-device styles, hover colours, entrance animation and display conditions.

正在使用
10 以下
评分
暂无
累计下载
337
最近更新
2026年11月13日
需要 WordPress 7.1+已测试到 7.1.5PHP 8.1+

贡献者

Zealblocks adds blocks that build on WordPress 7.1’s block API instead of
duplicating it. Core’s typography, colour, spacing and border controls — and
core’s per-viewport style states — are declared as supports and inherited, not
reimplemented. What Zealblocks adds is the part core leaves out.

Blocks

  • Icon — an SVG icon from the bundled icon library, with flip, free rotation, right-to-left mirroring, hover colours, an optional link and a proper decorative/meaningful accessibility choice.
  • Text — text as any of 41 HTML tags, with a visual style preset (Display, H1–H6, Lead, Body, Caption or Eyebrow) chosen independently of the tag, a drop cap, per-viewport column gap, text shadow and position, and hover colours.
  • Buttons — a flex container for one or more buttons, with block gap, padding, margin, background (with a hover colour or gradient), border, shadow and wide/full alignment.
  • Button — a button-style link with an optional icon. Per-viewport width, icon size and text–icon gap; hover colours for text, background, border, icon and shadow that also show on keyboard focus; margin and padding on every side; icon rotation; icon-only buttons; and a second icon that swaps in on hover.

On every block

  • Entrance animation — 23 types, with duration, delay, easing and replay. A block plays when it scrolls into view, stays still for visitors who prefer reduced motion, and is never hidden when JavaScript is off.
  • Display conditions — hide a block when the visitor is logged in or out, has a given role, uses a given browser or operating system, or on chosen days. Decided on the server, so hidden content is not in the page source. With full-page caching, the browser, system and day conditions follow whoever filled the cache.
  • Z-index, per viewport.
  • Core’s own per-viewport hiding works on every block.

1,992 icons, shared by every block

The Icon and Button blocks draw from one bundled library of 1,992 Font Awesome
Free icons, searchable and grouped into 68 categories. A block stores only the
icon’s name, so the artwork is resolved when the page renders — post content
stays small, and an updated icon set applies to pages already published.

The picker loads its artwork only when you open it, so an editor session that
never picks an icon never downloads one.

Icons are marked up correctly for assistive technology: leave the alternative
text empty and the icon is hidden from screen readers as decoration; set it and
the icon is announced as content. That distinction is the most commonly missed
part of icon accessibility.

The typographic scale follows your theme

The Text block’s presets are emitted as classes, and each one resolves through your
theme’s own theme.json font-size presets before falling back to a fluid
clamp(). So a theme with a real type scale drives the look, a theme without
one still renders sensibly, and a theme can override the whole scale in one
place. Nothing is written as an inline style, which is what would otherwise beat
the theme permanently.

The Eyebrow preset — the small uppercase label that sits above a heading — has
no equivalent in core, and is the one most often faked with an undersized H6.

On responsive values

WordPress 7.1 emits per-viewport CSS for its own style paths, so Zealblocks does
not need to reinvent that and does not try to. Where Zealblocks adds a property
core has no support for, it stores the value inside core’s own style attribute
under a namespaced key, in core’s viewport-state shape, and generates the CSS
using core’s media queries:

style.zealblocks.width for the base layer, `style.@tablet.zealblocks.width`

and style.@mobile.zealblocks.width for the overrides. Icon size uses the
same shape under iconSize.

The breakpoints come from WP_Theme_JSON::get_viewport_media_queries(), which
reads settings.viewport from theme.json. Change your breakpoints there and
Zealblocks follows, because it never had its own.

Desktop is the base layer rather than a third band, matching core: it carries no
media query and applies at every width, so Mobile falls back to the base value
when unset, never to Tablet.

Icons

Any icon from the bundled library, positionable left or right. Position is done
with flex-direction: row-reverse rather than order, so the DOM order stays
text-then-icon and the button’s accessible name is unaffected by where the icon
appears. Icons are marked aria-hidden — they are decorative, and the button
text is the accessible name. An icon-only button does not show its text, but
keeps it as the button’s aria-label, so it is still announced.

Directional icons can be set to mirror in right-to-left languages. It is opt-in
per block, because an arrow should flip and a clock should not.

Privacy

Zealblocks does not collect, store or transmit any data. It makes no external
network requests, sets no cookies, and creates no database tables.

It registers two REST routes under zealblocks/v1, used by the editor to look
up icon names and artwork. Both require the edit_posts capability, read only
from files bundled with the plugin, and are never called by the front end.

Credits

Icons are from Font Awesome Free 7.3.1, licensed CC BY 4.0
(https://fontawesome.com/license/free). Font Awesome is a trademark of
Fonticons, Inc.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums