Skip to content

Promo - Web Component โ€‹

Browser support โ€‹

Detected engine: ย 

  • Chromium

  • Webkit

  • Gecko

Parameters โ€‹

The Web component uses the <z-promo> tag:

The parametrization of the component can be done with the following custom HTML params:

NameTypeDescription
config
(optional)
stringConfiguration of the promo
header
(optional)
stringHeader of the promo
button-text
(optional)
stringText of the button
image-srcstringURL of the image
category
(optional)
stringCategory of the promo
content
(optional)
stringContent of the promo

The available slots for the component are:

NameTagsDescription
defaultspan

The header attribute is the title of the promo component.

button-text โ€‹

The button-text attribute is the text of the button.

image-src โ€‹

The image-src attribute is the URL of the image.

You can also use the images from the Zurich media images. Make sure you specify correctly the name of the image you want to display.

category โ€‹

The category attribute is the category of the promo component.

config โ€‹

The config attribute has two modifiers.

left โ€‹

The left modifier will align the content to the left.

Promotional content
narrow โ€‹

The narrow modifier will reduce the width of the promo component.

Promotional content

Playground โ€‹

Customization โ€‹

HTML Examples โ€‹

Imports
html
<link rel="stylesheet" href="/0.4.5/@zurich/web-components/styles.css" />
<script type="module" src="/0.4.5/@zurich/web-components/promo.js"></script>
Code
html
<z-promo header="Promotional header" image-src="../sample.png" button-text="Go to Promotion"
  category="One time offer">
  Promotional content
</z-promo>