Skip to content

Article card - Web Component โ€‹

Browser support โ€‹

Detected engine: ย 

  • Chromium

  • Webkit

  • Gecko

Parameters โ€‹

The Web component uses the <z-article-card> tag:

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

NameTypeDescription
image-srcstringThe image URL of the article card
tagsstring[]The tags of the article card
headerstringThe title of the article card
contentstringThe content of the article card
button-textstringThe link text of the article card
button-iconstringThe link icon of the article card

The available slots for the component are:

NameTagsDescription
defaultspan

image-src โ€‹

The image-src parameter is used to define the image URL to be displayed inside article card.

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.

tags โ€‹

The tags attribute is used to set the tags of the article card.

The header attribute is used to set the header of the article card.

content โ€‹

The content attribute is used to set the content of the article card.

Article card content

button-text โ€‹

The button-text attribute is used to set the text of the button.

button-icon โ€‹

The button-icon attribute is used to set the icon of the button.

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/article-card.js"></script>
Code
html
<z-article-card header="Title" image-src="/0.4.5/sample.png" content="Description" tag="Tag text"
  button-text="Link">
</z-article-card>