Basics: what module-big-button is

module-big-button is a pure CTA module that renders a large clickable area with an icon and text, typically placed where you want to drive conversions.

The module is technically simple but important: it is static, clear, and has built-in auto logic for link formats and icon choice in the build step.

It works well for bookings, contact, downloads or internal navigation to sections such as #module-contact.

Option 1: core keys and copy

The core of the module is display, aria_label, text, target, link and icon, plus an optional background under background.*.

text should be short and action-driven, while aria_label needs to explain where the button leads. target is normally _self but can be set to _blank for external destinations.

The module has no items array, which makes it quick to configure and easy to reuse across pages.

Option 2: auto_href logic in the compiler

The build function buildAuto() generates big_button.auto_href from link/href.

  • link: phone tries to build a tel: link from several fallback fields (hero/contact/site/page).
  • link: email tries to build a mailto: link from email fields or a user/domain combination.
  • link: #section becomes an internal anchor link.
  • link: https://... becomes an external link.

If nothing matches, the explicit href is used, or the fallback #. This keeps the module robust even when the input varies between projects.

Option 3: icon choice, appearance and design

big_button.auto_svg is also generated in buildAuto(). If icon is set, it is used directly (except none). If no icon is set, one is chosen automatically from the link type (phone/email/section/link).

Styling levels:

  • big_button.appearance becomes auto_class/auto_style
  • design colours come from design.background_colors.big_button and design.text_colors.big_button
  • typography comes from design.font_sizes.big_button

The result is a CTA that follows the design system but can still get a local visual accent through appearance tokens.

Option 4: template rendering and accessibility

In the template, the module is rendered as an <a> element with the classes card-button big-button track-clicks. The icon is injected before the text via {{big_button.auto_svg}}.

Semantically, the button uses aria-label. The CSS has a clear focus state with :focus-visible, and on mobile the button goes full width for an easier tap target.

There is no separate JS init for the module, which reduces complexity and makes its behaviour very predictable.

Option 5: schema, SEO and AI optimisation

For this module, Action is often the right schema type, especially for bookings or a clear CTA. If the button leads to a phone number or email address, ContactPoint can complement it.

Keep the schema focused on the action: use a stable @id, a clear name and a correct target. Avoid duplicating global Organization/WebPage nodes here.

For SEO, the module works best when the button text and aria-label are concrete and consistent with the page's actual conversion goal.