hugoblox.com/blocks/cta-card
CTA Card block preview
Calls to actionFree · MITPreact · interactive

CTA Card block

A high-contrast call-to-action card — bold headline, supporting line, and a button to drive the next step.

Add it to any Hugo page's sections list — no build step.

v1.0.0Version
7Options
MITLicense

Quick start

Add the CTA Card block

Drop this into your page's front matter, under the sections list. Edit the values, and HugoBlox renders the block — no build step.

Add to your page's sections
- block: cta-card
  design:
    background:
      gradient:
        start: primary-500
        end: secondary-600
        direction: "135"
      text_color_light: true
    card:
      css_class: glassmorphism-primary
      text_color: auto
      overlay_opacity: 0.15
  content:
    title: Ready to launch?
    text: Ship a Hugo Blox site with production-ready Tailwind 4 in minutes.
    button:
      url: /contact/
      text: Talk to us
      icon: hero/arrow-right

Overview

About the CTA Card block

Create irresistible calls-to-action that convert

Make a bold statement and drive immediate action with the CTA Card block - a high-impact, conversion-optimized component designed to capture attention and compel your visitors to take the next step.

✨ Key Features

  • 🪟 2025 Glassmorphism: Modern translucent backgrounds with backdrop blur effects
  • 🎨 Gradient Typography: Beautiful gradient text effects for maximum visual appeal
  • 🔗 Smart Icon Support: Add icons to buttons with automatic sizing and hover animations
  • 📱 Enhanced Responsiveness: Fluid typography scaling from mobile to desktop
  • ✨ Micro-Interactions: Smooth hover animations with glow effects and transforms
  • 🎯 Customizable Styling: Multiple glassmorphism presets or custom CSS classes
  • ♿ Accessibility Enhanced: Improved focus states and semantic markup

🎯 Perfect For

  • Newsletter Signups: Encourage email subscriptions with compelling copy
  • Product Launches: Announce new products or services with impact
  • Event Promotions: Drive registrations and attendance
  • Lead Generation: Capture leads with irresistible offers
  • Content Downloads: Promote whitepapers, guides, and resources
  • Service Inquiries: Convert visitors into prospects and clients

🚀 Why Choose CTA Card?

Maximum Visual Impact: Bold design that stands out on any page and captures immediate attention

Conversion Focused: Every element is optimized for driving action, from typography to button placement

Brand Flexible: Fully customizable styling to match your brand colors and aesthetic

Proven Results: Based on high-converting design patterns used by top marketing teams

📊 Conversion Psychology

  • Contrast Principle: Dark background creates visual separation and focus
  • Size Hierarchy: Large headlines establish clear information priority
  • Action Clarity: Single, prominent button reduces decision paralysis
  • Emotional Appeal: Space for compelling copy that connects with your audience

💡 Best Practices

  • Keep headlines short and benefit-focused
  • Use action-oriented button text ("Get Started", "Download Now", "Join Today")
  • Ensure your copy addresses a specific pain point or desire
  • Test different background colors to maximize contrast with your site

Transform casual visitors into engaged users with a CTA Card that's impossible to ignore.

🎨 2025 Glassmorphism Styling Options

Glassmorphism Primary (Recommended)

- block: cta-card
  content:
    title: 'Ready to Get Started?'
    text: 'Join thousands of users creating amazing websites'
    button:
      text: 'Get Started Free'
      url: '/signup/'
      icon: 'hero/rocket-launch'
  design:
    card:
      css_class: 'cta-glassmorphism'
      text_color: 'auto' # auto|light|dark
      overlay_opacity: 0.15 # 0.0-1.0 for contrast control
    background:
      gradient:
        start: 'primary-500'
        end: 'primary-700'
        direction: 135
      image:
        filename: 'textures/noise-pattern.svg'
        size: '32px'
        position: 'repeat'

Glassmorphism Dark

design:
  card:
    css_class: 'glassmorphism-dark glass-ring glass-shadow text-white'

Glassmorphism Light

design:
  card:
    css_class: 'glassmorphism-light glass-ring glass-shadow text-gray-900'

Custom Background + Glassmorphism

design:
  card:
    css_class: 'glassmorphism-secondary noise-texture text-white'
  background:
    color: 'primary-600'
    image:
      filename: 'your-background.jpg'
      size: 'cover'
      position: 'center'
      opacity: 0.8
    gradient:
      start: 'primary-500'
      end: 'secondary-600'
      direction: 135

🔗 Icon Support

Add icons to your CTA buttons:

button:
  text: 'Download Now'
  url: '/download/'
  icon: 'hero/download'        # Download icon

button:
  text: 'Contact Us'
  url: 'mailto:[email protected]'
  icon: 'hero/paper-airplane'  # Email icon

button:
  text: 'Learn More'
  url: '#features'
  icon: 'hero/arrow-right'     # Arrow icon

🎨 Contrast Control Options

Text Color Modes

card:
  text_color: 'auto'    # Auto-detects based on background brightness
  text_color: 'light'   # Force white text (for dark backgrounds)
  text_color: 'dark'    # Force dark text (for light backgrounds)

Overlay Opacity Control

card:
  overlay_opacity: 0.1   # Subtle glassmorphism (better for text contrast)
  overlay_opacity: 0.15  # Default glassmorphism
  overlay_opacity: 0.25  # Strong glassmorphism (may reduce contrast)
  overlay_opacity: 0.05  # Minimal glassmorphism (maximum contrast)

Perfect Contrast Examples

Dark Background (Light Text):

design:
  card:
    css_class: 'cta-glassmorphism'
    text_color: 'light'
    overlay_opacity: 0.1
  background:
    gradient:
      start: 'gray-800'
      end: 'gray-900'

Light Background (Dark Text):

design:
  card:
    css_class: 'cta-glassmorphism'
    text_color: 'dark'
    overlay_opacity: 0.2
  background:
    gradient:
      start: 'gray-100'
      end: 'gray-300'

Vibrant Background (Auto Detection):

design:
  card:
    css_class: 'cta-glassmorphism'
    text_color: 'auto' # Will detect primary-500 as medium and use adaptive colors
    overlay_opacity: 0.15
  background:
    gradient:
      start: 'primary-500'
      end: 'primary-700'

✨ Available Glassmorphism Classes

  • cta-glassmorphism: Smart adaptive glassmorphism with contrast controls
  • glassmorphism-primary: Primary color glassmorphism (legacy)
  • glassmorphism-secondary: Secondary color glassmorphism (legacy)
  • glassmorphism-dark: Dark glassmorphism (legacy)
  • glassmorphism-light: Light glassmorphism (legacy)
  • glass-ring: Enhanced ring borders
  • glass-shadow: Multi-layer glass shadows
  • noise-texture: Subtle noise texture overlay

Flexibility

Layouts & variants

Switch the block's design with these presets — no custom CSS.

card.text_colorText color mode for optimal contrast (auto detects based on background)
autodefaultlightdark

Reference

Configuration

Every option the CTA Card block accepts, generated from its schema.

Content options

Properties set under the block's content key.

PropertyTypeDefaultDescription
titlerequiredstringCard title (supports Markdown)
textrequiredstringCard description text (supports Markdown)
buttonrequiredobjectCall-to-action button
button.urlrequiredstringButton destination. Use `#<section-id>` for a same-page anchor (e.g. `#contact` if a contact section declares `id: contact`), `/path/` for an internal page, or a full `https://…` URL for external links.
button.textrequiredstringButton text
button.iconstringOptional button icon (icon pack format: pack/icon-name)
button.new_tabbooleanfalseOpen the button link in a new tab

Design options

Properties set under the block's design key — shared background, spacing, and color settings apply on top.

PropertyTypeDefaultDescription
cardobject
card.css_classstringCSS classes to apply to the card (e.g., glassmorphism-primary, glass-ring)
card.css_stylestringInline CSS for the card container
card.text_colorauto | light | darkautoText color mode for optimal contrast (auto detects based on background)
card.overlay_opacitynumber0.15Glassmorphism overlay opacity for fine-tuning contrast

Compose

Works well with

Blocks that pair naturally with CTA Card on the same page.

Frequently asked

CTA Card block FAQ

  • Add a "block: cta-card" entry to the sections list in your page's front matter, then fill in the content fields. HugoBlox renders it automatically — copy the example config above as a starting point.

Ready to build with the CTA Card block?