Skip to content

Promo - Web Component โ€‹

The Promo component can be used imported from:

Playground โ€‹

Parameters โ€‹

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

By default, all the parameters are optional or can be set in different, except for the ones marked as required

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

NameTypeDescriptionSlotA11y
image-src
[required]
stringURL of the image
configstringConfiguration of the promo
headerstringHeader of the promoheader
button-textstringText of the button
button-iconstringIcon of the button
categorystringCategory of the promocategory
contentstringContent of the promodefault

Events โ€‹

This component has events. Check the documentation about how to use the events.

NamePayloadDescription

Slots โ€‹

This component has slots. Check the documentation about how to use the slots.

NameTagsDescription
defaultspanContent of the promo
categoryspanCategory of the promo
headerspanHeader of the promo
actionsspanActions of the promo

Parameters use โ€‹

content โ€‹

The content attribute is inject the main quote or using the default slot:

Promo content

The header attribute is the title of the promo component or using the header slot.

Promotional header

shape โ€‹

The shape can de changed using the shape attribute:

Content goes here

Or using a slotted z-shape. No need to set the :flip, it's automatically handled.

Content goes here

Actions โ€‹

The button-text and button-icon attributes can be used to the the basics of the action button.

We can alternatively use the actions slot make more complex things:

Action 1Action 2

Image โ€‹

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.

We can also use the image slot:

category โ€‹

The category attribute is the category of the promo component.

We can use the category slot to inject other kind of assets:

Category 1Category 2

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

Browser support โ€‹

Detected engine: ย 

  • Chromium

  • Webkit

  • Gecko

HTML Examples โ€‹

CodeSandbox example โ€‹