Layout · Gutenberg

Gradient Section block for WordPress

A full-width section with an animated CSS gradient background, headline, subtext, and dual call-to-action buttons.

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.

Get Blockenberg

What it actually does

A full-width section with an animated CSS gradient background, headline, subtext, and dual call-to-action buttons.

Inspector panels on this block: Gradient, Content, Layout. Those titles come from index.js, not from a shared template.

Behavior controls: “Headline tag” options: H1, H2, H3, H4; “Button 1 style” options: Filled, Outline, Ghost; “Text align” options: Center, Left, Right.

Where to find it

Gutenberg inserter → Layout → search “Gradient Section” (block name `blockenberg/gradient-section` in block.json). Style it in the sidebar after insert.

How to use Gradient Section block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Gradient Section”, insert it. Category: Layout.
  3. Configure inspector controls that exist on this block. Open Gradient. Set “Gradient angle (°)”, “Animate gradient”, “Animation speed (s)”, “Overlay”.
  4. Check the published page. An IntersectionObserver starts work when the block enters the viewport. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Gradient angle (°)Numeric range control in the inspector. Range 0–360. block.json default: 135. Saved as `gradientAngle`.
Animate gradientOn/off toggle in the inspector. On by default. Saved as `animate`.
Animation speed (s)Numeric range control in the inspector. Range 3–20. block.json default: 8. Saved as `animationDuration`.
OverlayOn/off toggle in the inspector. Off by default. Saved as `overlay`.
Show badgeOn/off toggle in the inspector. On by default. Saved as `showBadge`.
Badge textText field in the inspector. block.json default: ✨ New Feature. Saved as `badge`.
Headline tagSelect control; the chosen value is saved on the block. Options: H1; H2; H3; H4. block.json default: h2. Saved as `headlineTag`.
Button 1 labelText field in the inspector. block.json default: Get Started Free. Saved as `btnLabel`.
Button 1 URLText field in the inspector. Saved as `btnUrl`.
Button 1 styleSelect control; the chosen value is saved on the block. Options: Filled; Outline; Ghost. block.json default: filled. Saved as `btnStyle`.
Show second buttonOn/off toggle in the inspector. On by default. Saved as `showSecondBtn`.
Button 2 labelText field in the inspector. block.json default: Watch Demo. Saved as `btn2Label`.
Button 2 URLText field in the inspector. Saved as `btn2Url`.
Text alignSelect control; the chosen value is saved on the block. Options: Center; Left; Right. block.json default: center. Saved as `textAlign`.
Min height (px)Numeric range control in the inspector. Range 200–900. block.json default: 480. Saved as `minHeight`.
Content max widthNumeric range control in the inspector. Range 400–1400. block.json default: 680. Saved as `contentMaxWidth`.
Button radius (px)Numeric range control in the inspector. Range 0–99. block.json default: 99. Saved as `btnRadius`.
Badge radius (px)Numeric range control in the inspector. Range 0–99. block.json default: 99. Saved as `badgeRadius`.
HeadlineShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoHeadline`.
SubtextShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoSubtext`.
BadgeShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoBadge`.
Button (px)Numeric range control in the inspector. Range 13–22. block.json default: 16. Saved as `btnSize`.
Padding top (px)Numeric range control in the inspector. Range 0–200. block.json default: 96. Saved as `paddingTop`.
Padding bottom (px)Numeric range control in the inspector. Range 0–200. block.json default: 96. Saved as `paddingBottom`.

What the front-end script actually does

When this is the right block

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 Gradient Section block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Gradient Section”. It sits under Layout. After insert, open Gradient and set “Gradient angle (°)”, “Animate gradient”, “Animation speed (s)”, “Overlay”.

What makes Gradient Section different from other Blockenberg blocks?

A full-width section with an animated CSS gradient background, headline, subtext, and dual call-to-action buttons. Inspector labels on this block include “Gradient angle (°)”, “Animate gradient”, “Animation speed (s)”, “Overlay”.

Is the Gradient Section Gutenberg block free?

Yes. Gradient Section ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Gradient Section 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: Gradient, Content, Layout).

Related layout blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Gradient Section from the Gutenberg inserter.

Get Blockenberg