0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Call to action section patterns for landing pages and marketing sites. Centered banners, split layouts, and background image CTAs.
Overview
Call to Action (CTA) sections are critical conversion points on marketing pages. They typically appear after feature sections or at the bottom of landing pages, prompting users to take the next step. These patterns use section.hero for vertical centering and centered text, data-padding for fluid block padding, and <layout-center> for horizontal alignment.
The most common CTA pattern: centered headline, supporting text, and action buttons. Perfect for page endings and conversion sections. section.hero centers the content, .alt adds the raised surface, and data-padding swaps the hero's large padding for the fluid section padding.
Centered CTA with button group
<sectionclass="hero alt"data-padding><layout-centerdata-layout-max="normal"><layout-stackdata-layout-gap="l"><h2>Ready to get started?</h2><pclass="lead"> Join thousands of developers building better interfaces with Vanilla Breeze. Start your free trial today, no credit card required.</p><nav><uldata-layout="cluster"data-layout-justify="center"data-layout-gap="m"><li><ahref="/signup/"class="button large">Start Free Trial</a></li><li><ahref="/contact/"class="button large secondary">Talk to Sales</a></li></ul></nav></layout-stack></layout-center></section>
Split CTA with Form
Text on one side, form or image on the other. Uses <layout-sidebar> for a flexible two-column layout that stacks on narrow viewports, inside a plain section.alt so the text stays start-aligned. Great for newsletter signups and lead capture.
Split CTA with inline form
<sectionclass="alt"data-padding><layout-centerdata-layout-max="wide"><layout-sidebardata-layout-gap="2xl"data-layout-sidebar-width="wide"data-layout-content-min="m"><layout-stackdata-layout-gap="l"><h2>Get notified when we launch</h2><pclass="lead"> Be the first to know when new features are released. Sign up for early access and exclusive updates.</p><formclass="inline"action="/subscribe"method="POST"><form-field><inputtype="email"name="email"requiredautocomplete="email"placeholder="Enter your email"aria-label="Email address" /></form-field><buttontype="submit">Notify Me</button></form><p><small>We respect your privacy. Unsubscribe at any time.</small></p></layout-stack><imgsrc="/images/cta-illustration.png"alt="Product illustration"width="500"height="375"loading="lazy" /></layout-sidebar></layout-center></section>
With Background Image
Full-width background image with a dark overlay for text readability. The overlay uses --color-overlay-strong from design tokens. Great for creating visual impact.
CTA with background image
<sectionclass="hero cta-with-bg"data-padding><layout-centerdata-layout-max="normal"><layout-stackdata-layout-gap="l"><h2>Transform your workflow today</h2><pclass="lead"> Stop struggling with complex toolchains. Vanilla Breeze gives you everything you need to build beautiful, responsive interfaces.</p><nav><uldata-layout="cluster"data-layout-justify="center"data-layout-gap="m"><li><ahref="/signup/"class="button large">Get Started Free</a></li><li><ahref="/pricing/"class="button large ghost">See Pricing</a></li></ul></nav></layout-stack></layout-center></section>
Required CSS
Add these styles to support background images with overlay:
hero centers content with a 50vh minimum height; alt adds the raised surface background.
section
data-padding
(empty) smallxsmallnone
Fluid block padding for the section.
layout-center
data-layout-max
narrownormalwideprose
Maximum content width.
layout-sidebar
data-layout-sidebar-width
narrownormalwide
Width of the sidebar column.
data-layout="cluster"
data-layout-justify
startcenterendbetween
Horizontal alignment of buttons.
Usage Notes
Placement: CTAs work best after feature sections, testimonials, or at the bottom of landing pages. Avoid placing multiple CTAs too close together.
Button text: Use action-oriented language that clearly states the benefit (e.g., "Start Free Trial" instead of "Submit").
Primary vs secondary: Use one primary button for the main action and a secondary/ghost button for alternative actions.
Contrast: Ensure sufficient color contrast between text and background, especially with background images. Use --color-overlay-strong for dark overlays.
Height:section.hero has a 50vh minimum, which keeps a CTA shorter than a full-height hero section.
Forms: Keep inline forms simple with one or two fields. Use full forms in split layouts for more complex signups.
Mobile: Split layouts stack automatically on narrow viewports thanks to <layout-sidebar>.