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.
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
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Gradient Section”, insert it. Category: Layout.
- Configure inspector controls that exist on this block. Open Gradient. Set “Gradient angle (°)”, “Animate gradient”, “Animation speed (s)”, “Overlay”.
- 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
| Control | What the code does |
|---|---|
| Gradient angle (°) | Numeric range control in the inspector. Range 0–360. block.json default: 135. Saved as `gradientAngle`. |
| Animate gradient | On/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`. |
| Overlay | On/off toggle in the inspector. Off by default. Saved as `overlay`. |
| Show badge | On/off toggle in the inspector. On by default. Saved as `showBadge`. |
| Badge text | Text field in the inspector. block.json default: ✨ New Feature. Saved as `badge`. |
| Headline tag | Select control; the chosen value is saved on the block. Options: H1; H2; H3; H4. block.json default: h2. Saved as `headlineTag`. |
| Button 1 label | Text field in the inspector. block.json default: Get Started Free. Saved as `btnLabel`. |
| Button 1 URL | Text field in the inspector. Saved as `btnUrl`. |
| Button 1 style | Select control; the chosen value is saved on the block. Options: Filled; Outline; Ghost. block.json default: filled. Saved as `btnStyle`. |
| Show second button | On/off toggle in the inspector. On by default. Saved as `showSecondBtn`. |
| Button 2 label | Text field in the inspector. block.json default: Watch Demo. Saved as `btn2Label`. |
| Button 2 URL | Text field in the inspector. Saved as `btn2Url`. |
| Text align | Select 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 width | Numeric 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`. |
| Headline | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoHeadline`. |
| Subtext | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoSubtext`. |
| Badge | Shared 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
- An IntersectionObserver starts work when the block enters the viewport.
When this is the right block
- A full-width section with an animated CSS gradient background, headline, subtext, and dual call-to-action buttons — that is the job of Gradient Section, not a generic content block.
- Use it when you need the editor control labeled “Gradient angle (°)”, which exists on this block’s inspector.
- It matches pages about gradient, section, cta.
- Inserter grouping: page structure, sections, and composition.
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
Gradient Hero
Full landing page hero with animated gradient/mesh background, badge, headline, CTA buttons, and social proof row.
Dark Hero
Dark glassmorphism hero for AI, SaaS and tech sites. Features glow effects, gradient text, optional floating stat badges, badge pill, and rich button controls.
Skewed Section
A content section with diagonal/angled top and/or bottom edges created via CSS clip-path. Place any blocks inside.
Split Hero
Two-column hero section with headline, badge, body text, dual CTA buttons and social proof on one side — image or video on the other. Built for landing pages.
Page Header
A versatile page hero/banner section: eyebrow label, headline, subtitle, breadcrumbs, CTA buttons, and rich background options.
Section
A container section for organizing content with rows and columns.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Gradient Section from the Gutenberg inserter.