# Grainy Glass Panel

> A frosted glass panel with a subtle film-grain texture from an inline SVG noise filter, shown as a now-playing widget.

- Category: [CSS Effects](https://copy-css.com/category/effects)
- Tags: glassmorphism, noise, grain, texture, feturbulence, music player
- Live preview: https://copy-css.com/snippets/grainy-glass-panel
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<section class="grain-glass" aria-label="Now playing">
  <span class="grain-glass-art" aria-hidden="true"></span>
  <div>
    <p class="grain-glass-title">Night Drive</p>
    <p class="grain-glass-artist">Coastline</p>
    <span class="grain-glass-bar" aria-hidden="true"></span>
  </div>
</section>
```

## CSS

```css
.grain-glass {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 250px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E"),
    rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-family: system-ui, sans-serif;
}

.grain-glass-art {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: conic-gradient(from 200deg, #fbbf24, #f472b6, #818cf8, #fbbf24);
}

.grain-glass > div {
  flex: 1;
}

.grain-glass p {
  margin: 0;
}

.grain-glass-title {
  font-size: 15px;
  font-weight: 700;
}

.grain-glass-artist {
  font-size: 13px;
  opacity: 0.75;
}

.grain-glass-bar {
  display: block;
  height: 4px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fff 42%, rgba(255, 255, 255, 0.25) 0);
}
```

## Notes

- This CSS Grainy Glass Panel is 51 lines of pure CSS (1.2 KB) with no JavaScript and no dependencies. It uses linear gradients, conic gradients, box shadows and backdrop filters.
- backdrop filters: Includes the -webkit- prefix for older Safari.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
