# Notification Card

> A success notification with an accent border, icon and dismiss button.

- Category: [CSS Cards](https://copy-css.com/category/cards)
- Tags: notification, toast, alert, success, message
- Live preview: https://copy-css.com/snippets/notification-card
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="notice" role="status">
  <span class="notice-icon">✓</span>
  <div>
    <strong>Changes saved</strong>
    <p>Your profile has been updated.</p>
  </div>
  <button class="notice-close" aria-label="Dismiss">×</button>
</div>
```

## CSS

```css
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 260px;
  padding: 14px;
  border-left: 4px solid #22c55e;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
  font-family: system-ui, sans-serif;
}

.notice-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 13px;
  font-weight: 800;
}

.notice strong {
  display: block;
  color: #111;
  font-size: 14px;
}

.notice p {
  margin: 2px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
}

.notice-close {
  margin-left: auto;
  padding: 0 4px;
  border: 0;
  background: none;
  color: #9ca3af;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.notice-close:hover {
  color: #111;
}
```

## Notes

- This CSS Notification Card is 53 lines of pure CSS (0.8 KB) with no JavaScript and no dependencies. It uses box shadows, CSS Grid and Flexbox.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
