Skip to content

Avatar - CSS Component โ€‹

...

Browser support โ€‹

Construction โ€‹

TIP

Check the badge and the profile components to learn more about the component.

The CSS component uses a <div> tag with the z-avatar HTML custom attribute.

Name

description

Name

description

Playground โ€‹

Customization โ€‹

HTML Examples โ€‹

Imports
html
<link rel="stylesheet" href="/0.4.2/@zurich/css-components/base.css" />
<link rel="stylesheet" href="/0.4.2/@zurich/css-components/Avatar.css" />
<link rel="stylesheet" href="/0.4.2/@zurich/css-components/Badge.css" />
<link rel="stylesheet" href="/0.4.2/@zurich/css-components/Profile.css" />
Code
html
<div z-avatar="horizontal">
  <div z-badge="text:xs" text="1" fill="peach">
    <img z-profile="m" status="online" src="/0.4.2/sample.png" alt="AZ" />
  </div>
  <header>
    <p>John Doe</p>
    <span>Lorem ipsum</span>
  </header>
</div>