Skip to content

Navbar

A top bar with brand, links and actions. Sticky and translucent; collapses behind a menu button on small screens.

CSS + mian.js JSON Markdown Registry item

Responsive

Installation

Everything ships in one stylesheet and one small script. There is nothing to import per component.

<link rel="stylesheet" href="https://mian.ro/dist/mian.css">
<script src="https://mian.ro/dist/mian.js" defer></script>

Prefer to own the files? /r/navbar.json is a registry item with this component's CSS and example markup, ready to copy into your project with any tool that reads the open registry-item format.

Class reference

Class / attributeDescription
mn-navbarBar.
mn-navbar-sticky · mn-navbar-collapseStick to top · collapse links on mobile.
mn-navbar-brand · mn-navbar-nav · mn-navbar-link · mn-navbar-endParts.
mn-navbar-toggleMobile menu button; mian.js toggles it.

Accessibility

  • Wrap links in <nav aria-label>. Mark the current page with aria-current="page". The toggle updates aria-expanded.
Choose a noodle

Minimal

Flat

Pixel

Linear

Thin

Glass

Textured

Bold

Elegant

Rounded

On this page