# Popover Shadow

> A crisp, high-elevation shadow for popovers and dropdowns, with a hairline edge and a matching arrow.

- Category: [CSS Box Shadows](https://copy-css.com/category/shadows)
- Tags: dropdown, menu, overlay, tooltip, hairline
- Live preview: https://copy-css.com/snippets/popover-shadow
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="popover-panel">
  <strong>Saved to library</strong>
  <p>Find it under Favorites any time.</p>
</div>
```

## CSS

```css
.popover-panel {
  position: relative;
  width: 220px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #ffffff;
  color: #475569;
  font: 14px/1.45 system-ui, sans-serif;
  box-shadow:
    0 0 0 1px #0f172a14,
    0 4px 6px -2px #0f172a14,
    0 12px 24px -6px #0f172a29,
    0 24px 48px -12px #0f172a1f;
}

/* Arrow: a rotated square sharing the hairline edge */
.popover-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 24px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  box-shadow: -1px -1px 0 #0f172a14;
  transform: rotate(45deg);
}

.popover-panel strong {
  display: block;
  margin-bottom: 2px;
  color: #0f172a;
}

.popover-panel p {
  margin: 0;
}
```

## Notes

- This CSS Popover Shadow is 37 lines of pure CSS (0.7 KB) with no JavaScript and no dependencies. It uses transforms and box shadows.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
