NavigationNavbar

Open in Create
Search
astronomic.dev

Navbar

Free

To build your own navbar layout: the brand, the links, the actions and utilities, with the fold into a menu, sticky and floating. For a ready layout, use NavbarSimple, NavbarCentered, NavbarStacked or NavbarBrandCenter.

File
Navbar.astro
Group
Navigation
Kind
Interactive: inline script
Examples
4
import Navbar from "@astronomic-dev/ui/components/Navbar.astro";

Examples

Drag the orange handle to set the width. Frames get real breakpoints.

  • Static
  • Interactive
  • Framed

The four areas

The shell with each area filled: the brand slot, the links prop, the actions slot and the utilities slot. A site picks a recipe, such as NavbarSimple, which sets the layout. Below the md breakpoint the links fold into a menu button. In a frame, so the breakpoint is real.

main.astro

With a phone

The phone prop: the label over the number in the end group before the actions on wide screens, a 44px round call button with your icon below the fold point (it stays beside a CallBar there), and a "Call {number}" row in the menu. In a frame, so the fold point is real.

phone.astro

The number after the links fold

phone.iconOnlyBelow="nav-phone": the links fold into the menu at lg, but the number stays in the bar down to the phone's own fold point (theme.css --breakpoint-nav-phone, md by default; set it in your theme), then shows as the 44px round call button. In a frame, so both fold points are real.

phone-fold.astro

With an emergency line

The emergency slot, first in the end group at every width: here an urgent PhoneLink for the after-hours line, icon only on a phone, before the main number.

phone-emergency.astro
Minimal · Light

Waitlist

Be first in line

Join the waitlist and we'll email you the moment it's out.

You'll also get our newsletter: new themes, plugins and guides. Unsubscribe any time.