Default
Static glass bar — see Preview.
Glass app chrome — brand, nav links, and optional actions. Default full-bleed bar or island pill; collapses behind a toggle on small screens.
Live
Narrow the viewport to exercise the toggle
(aria-expanded / aria-controls.
Static glass bar — see Preview.
.ui-navbar--sticky / React sticky — sticks to the top of
the viewport.
.is-open / data-open on root and collapse; toggle sets
aria-expanded.
Use React open / defaultOpen for controlled or initial state.
Trailing slot via .ui-navbar__actions / NavbarActions.
.ui-navbar--island / React variant="island" — same glass
recipe as default Navbar, cropped to a centered pill. Mid-page demos use
.ui-navbar--embed so the pill stays in-flow (page chrome omits embed
for the fixed mobile menu).
<header>. Pair with Nav for the primary
landmark and give it an aria-label.
aria-expanded,
aria-controls pointing at the collapse id, and a host-owned
aria-label (React label).
aria-hidden="true".NavbarToggle. Opt-in dismiss:
closeOnOutsideClick / closeOnSwipe (React) or
data-close-on-outside-click /
data-close-on-swipe (HTML).
position: fixed under the pill and stacks
Nav links vertically so they fit narrow viewports. Set
--navbar-island-menu-top from the inner bar’s bottom when open
(React does this for variant="island"; HTML hosts should mirror
that on resize/scroll). Crossing min-width: 64rem (1024px) closes the menu
so aria-expanded stays accurate while the toggle is hidden.
alt.| Class | Description |
|---|---|
.ui-navbar |
Root glass chrome bar. |
.ui-navbar--sticky |
Sticky to the top of the viewport. |
.ui-navbar--island |
Pill crop of the same glass tokens as default Navbar. |
.ui-navbar--embed |
Mid-page / docs showcase — island stays an in-flow pill (no viewport-fixed mobile menu). |
.ui-navbar__inner |
Flex row for brand, toggle, collapse. |
.ui-navbar__brand |
Logo / product name slot. |
.ui-navbar__toggle |
Mobile menu button (bars inside). |
.ui-navbar__collapse |
Collapsible region for nav + actions. |
.ui-navbar__actions |
Trailing actions slot. |
.is-open |
Expanded collapse state on root and collapse. |
From src/core/Navbar.tsx — compound
Navbar / NavbarBrand / NavbarToggle /
NavbarCollapse / NavbarActions. Compose with
Nav inside the collapse.
| Prop | Type | Default | Description |
|---|---|---|---|
sticky |
boolean |
false |
Applies .ui-navbar--sticky. |
variant |
'default' | 'island' |
'default' |
island applies .ui-navbar--island (layout only; same
glass tokens).
|
embed |
boolean |
false |
Applies .ui-navbar--embed — in-flow island for mid-page demos.
|
open / defaultOpen |
boolean |
false |
Controlled or uncontrolled collapse open state. |
onOpenChange |
(open: boolean) => void |
— | Fires when the collapse toggles. |
closeOnOutsideClick |
boolean |
false |
When open, pointer down outside the navbar closes the menu. HTML:
data-close-on-outside-click.
|
closeOnSwipe |
boolean |
false |
When open, a vertical swipe on the collapse (≥56px) closes the menu. HTML:
data-close-on-swipe.
|
NavbarToggle label |
string |
— | Required accessible name for the menu button. |