Skip to content

Action card - Web Component โ€‹

Browser support โ€‹

Detected engine: ย 

  • Chromium

  • Webkit

  • Gecko

Parameters โ€‹

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

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

NameTypeDescription
image-srcstringThe image URL of the action card
pictogramstringThe pictogram of the action card
pre-linestringThe line above the header where some text can be displayed
tagsstring[]The tags of the action card
headerstringThe title of the action card
contentstringThe content of the action card
button-textstringThe text of the button
button-iconstringThe icon of the button
action-iconstringThe icon of the action

The events emitted from the component are:

NamePayloadDescription
onactionEventFired when the user clicks the action icon

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 action 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.

pictogram โ€‹

The pictogram parameter is used to define the pictogram to be displayed inside action card. Make sure you specify correctly the name of the pictogram you want to display. Check the Pictogram component for the list of available pictograms.

If both image-src and pictogram are defined, the pictogram will be displayed.

pre-line & tags โ€‹

The Action Card component allows to insert a pre-line before the header, you can ether add tags to the pre-line or add a text.

Attention!

If the tags attribute is used, the pre-line attribute will be ignored.

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

content โ€‹

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

Action 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.

action-icon โ€‹

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

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