Nav

The .glass-nav utility class for glassmorphic navigation bars.

Use .glass-nav when you need navigation bar styling on a non-<nav> element.

Preview

AppName

Usage

<div class="glass-nav">
  <strong>AppName</strong>
  <div>
    <a href="#">Home</a>
    <a href="#">Settings</a>
  </div>
</div>

CSS Properties

PropertyValue
Backgroundvar(--glass-bg) with backdrop-filter: blur(var(--glass-blur))
Border1px solid var(--glass-border)
Border Radiusvar(--glass-radius-md) (14px)
Padding0.75rem 1.5rem
Layoutdisplay: flex; justify-content: space-between; align-items: center
Width100%
DepthSpecular glare + ambient shadow

Difference from Semantic <nav>

The .glass-nav class is nearly identical to the semantic <nav> styling, but does not include the max-width: 800px and auto-margin centering that the semantic <nav> applies. This makes .glass-nav more flexible for full-width layouts.

Compatible Modifiers

  • .thin — lighter glass
  • .thick — heavier frost