Skip to content

Article card - CSS Component โ€‹

...

Browser support โ€‹

Detected engine: ย 

  • Chromium

  • Webkit

  • Gecko

Construction โ€‹

The CSS component uses an <article> tag with the z-article-card HTML custom attribute.

image โ€‹

Inserting an Image component tag inside the z-article-card tag will render an image.

Test image
Header

Article card content

tags โ€‹

The Article Card component allow tags to be inserted.

tag
color
Header

Action card content

title โ€‹

You can add a title to the action card inserting a header tag inside the main tag.

Header
description โ€‹

Also, using a p tag inside the main tag, you can add a description to the action card.

Article card content

You can add a link to the action card inserting a button tag inside the main tag.

Header

Action card content

Playground โ€‹

Customization โ€‹

HTML Examples โ€‹

Imports
html
<link rel="stylesheet" href="/0.4.5/@zurich/design-tokens/Icons.css" />
<link rel="stylesheet" href="/0.4.5/@zurich/css-components/base.css" />
<link rel="stylesheet" href="/0.4.5/@zurich/css-components/ArticleCard.css" />
<link rel="stylesheet" href="/0.4.5/@zurich/css-components/Tag.css" />
<link rel="stylesheet" href="/0.4.5/@zurich/css-components/Button.css" />
Code
html
<article z-article-card>
  <img src="/0.4.5/sample.png" alt="Article card image" />
  <main>
    <div>
      <div z-tag>Tag text</div>
    </div>
    <header>Title</header>
    <p>Description</p>
    <button z-button="primary" icon="link:line">Link</button>
  </main>
</article>