Etch component

CTA Band 1

A band that asks visitors to act: a title, a short text, optional details such as a phone and an email, and one or two buttons. On wide screens the text sits beside the buttons.

CTA Band 1

Copy CTA Band 1

Configurator settings

Change a setting in the configurator to include it.

Optional. Copies the component under its own name, such as News Card Alpha for a site.

Documentation

A band that asks visitors to act: a title, a short text, optional details such as a phone and an email, and one or two buttons. On wide screens the text sits beside the buttons.

How to use it

  • Fill in Eyebrow, Headline and Lede as in MAC Intro 1. An empty eyebrow or lede shows nothing.
  • CTA Type picks the buttons: Single (the default) shows one MAC CTA 1, set in CTA; Group shows MAC CTA Group 1, set in CTA Group; None shows no button.
  • The buttons are Medium by default, and in a group the first one is outlined; Size and Outline in CTA and CTA Group change them.
  • The details slot takes a MAC Details List 1, such as a phone and an email in a row. The pasted band comes with one; leave the slot empty for text and buttons only.

Good to know

  • When the buttons don't fit beside the text, they move under it.

CSS recipes

--mac-cta-band-1-background sets the band's background (--bg-ultra-light), --mac-cta-band-1-space the space above and below it (--section-space-s), and --mac-cta-band-1-gap the space between the text and the buttons. A recipe changes every CTA Band 1 on the site: paste it in the site's main stylesheet, which Etch prints after the components' styles.

On a dark ground

For a band that should stand out on a light page, on the site's darkest neutral with light text.

/* The band on a dark ground, its text light */
.mac-cta-band-1 {
  /* ACSS's colors take their dark side inside the band: its background, --bg-ultra-light, turns the darkest neutral */
  color-scheme: dark;

  /* The eyebrow in the light primary shade, as on Hero 1's overlay */
  & .mac-eyebrow-1 {
    color-scheme: light;
    color: var(--primary-light);
  }

  /* The buttons keep the light side, as on the rest of the site */
  & [class*="btn--"] {
    color-scheme: light;
  }

  /* An outlined button's text light on the dark ground; ACSS loads after the main stylesheet, so this selector is longer than its own */
  & [class*="btn--"].btn--outline {
    --btn-text-color: var(--primary-ultra-light);
  }
}

Right above a dark footer, such as MAC Footer 3, the band would merge with it: keep the light band there.

Reference

Read from the component's JSON, so it's always current.

Loading the reference