Charcoal UI

Navbar Floating

A glass pill that hides on scroll down, with a gliding hover highlight and a mobile sheet.

  • Type: Navbar section
  • Styles: Dark, Minimal
  • Licence: Charcoal UI Pro

About Navbar Floating

Navbar Floating is a glass pill that hides on scroll down and returns on scroll up, with a gliding hover highlight and a mobile sheet menu.

It is a full-width navbar section for React and Tailwind CSS 4, in a dark and minimal style. Preview it at any width above, then install it with one command.

When to use Navbar Floating

  • SaaS and product sites.
  • Landing pages.
  • Portfolios.
  • Docs sites.

How it is built

Scroll direction drives visibility, and Sheet holds the mobile menu with focus trapping.

It is composed from Button, Sheet, so installing it also installs those components, and you can restyle each one the same way you would on its own.

Goes well with Navbar Floating

Navbar Floating is part of 83 full templates, so you can see it in a finished page.

Install Navbar Floating

npx shadcn@latest add @charcoal/navbar-floating

Navbar Floating is part of Charcoal UI Pro: one seat covers all 107 sections, 100 templates and 300 Pro components, for unlimited projects. The command installs the section into components/sections along with every component it uses.

Frequently asked questions

Does Navbar Floating work with Next.js?
Yes. It is a React 19 component styled with Tailwind CSS 4, so it drops into a Next.js page, a Vite app, Remix or Astro.
Can I change the copy and colours?
Yes. The section is a file in your project. Text, links and images are plain props or JSX, and colours come from your theme's CSS variables, so a brand change is a token edit.

Built from

  • Button: Six variants with spring press feedback. The loading state swaps the label for a spinner without changing width.
  • Sheet: Side panel on the native <dialog> element. It slides in from either edge, and you can fling it back to close.

Navbar Floating as Markdown