# Contact Card

> A contact card with an avatar, role and clickable email and phone links marked with small icons.

- Category: [CSS Cards](https://copy-css.com/category/cards)
- Tags: contact, vcard, email, phone, business card, support
- Live preview: https://copy-css.com/snippets/contact-card
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<article class="contact-card">
  <span class="contact-card-avatar" aria-hidden="true">AO</span>
  <div>
    <h3>Ana Ortiz</h3>
    <p>Account manager</p>
    <a class="contact-card-mail" href="mailto:ana@example.com">ana@example.com</a>
    <a class="contact-card-tel" href="tel:+15551234567">+1 555 123 4567</a>
  </div>
</article>
```

## CSS

```css
.contact-card {
  display: flex;
  gap: 14px;
  width: 280px;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px -8px rgba(124, 45, 18, 0.2);
  color: #431407;
  font-family: system-ui, sans-serif;
}

.contact-card-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #fb923c;
  color: #fff;
  font-weight: 700;
}

.contact-card h3 {
  margin: 0;
  font-size: 16px;
}

.contact-card p {
  margin: 2px 0 10px;
  color: #9a5b3d;
  font-size: 13px;
}

.contact-card a {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  border-radius: 4px;
  color: #c2410c;
  font-size: 14px;
  text-decoration: none;
}

.contact-card a::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.contact-card-mail {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
}

.contact-card-tel {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2'/%3E%3C/svg%3E");
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-card a:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}
```

## Notes

- This CSS Contact Card is 71 lines of pure CSS (1.7 KB) with no JavaScript and no dependencies. It uses box shadows, masks, CSS Grid and Flexbox.
- Customize with: `--icon`.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
