Skip to content

Bottom Navigation with Center Action Button

Pure CSS mobile tab bar with a curved notch, a raised gradient center button and three quick actions that fan out when it is tapped.

Also known as: mobile tab bar, floating action button menu, app bottom bar, curved bottom navigation

Bottom Navigation with Center Action Button live demo

Open in new tab

Pure CSS code (HTML, CSS, JS)

An app-style bottom navigation bar in pure CSS with a raised, gradient center action button that sits in a curved notch and fans out three quick actions. It is shown inside a phone frame and suits mobile web apps, PWAs, social and productivity apps where the main "create" action should always be one tap away.

How it works

The root .bnc-app holds the scrollable .bnc-screen, a .bnc-scrim, the .bnc-actions group and the nav.bnc-bar. The bar is a five-column grid: two .bnc-tab links on each side and a .bnc-center cell in the middle. The white bar background is drawn by .bnc-bar::before, and a radial-gradient mask cuts a half circle out of its top edge. Because the drop-shadow filter is applied to the bar itself, the shadow follows the curve of the notch. The .bnc-fab button is centered on the top edge with translate(-50%, -50%), so it rises out of the notch.

The script listens for click on the center button and toggles the .is-open class on .bnc-app together with aria-expanded. With that class the plus icon rotates into a cross, the scrim fades in, and the three .bnc-action buttons spring from behind the button into an arc (.bnc-action--left, --center and --right). Clicking the scrim, an action or pressing Escape closes the menu. Clicks on a tab move aria-current="page" to that tab, which turns it pink and adds a small dot under the label. Without JavaScript the bar and tabs still render; only the action menu needs the script.

Customization

  • --bnc-accent and --bnc-accent-2 on .bnc-app: the two gradient stops of the center button, plus the active tab, badge and action colors.
  • --bnc-fab-size: the center button diameter; the notch radius is calculated from it, so they always match.
  • --bnc-bar-height and --bnc-bar-bg: height and background color of the tab bar, e.g. a dark #1f1029 bar.
  • --bnc-speed: duration of the springy open and close animation.
  • Edit the .bnc-action buttons inside .bnc-actions to change the quick actions, and add your logic in the action click handler in script.js.
  • Add .bnc-bar--fixed to .bnc-bar to pin it to the bottom of the viewport in a real app instead of the demo frame.

Use cases

  • Mobile web apps and PWAs: main tabs at the bottom where the thumb reaches them
  • Social and content apps: a center create button for a new post, photo or story
  • Productivity apps: quick actions such as new task, note or event from any screen

Accessibility

The bar is a nav landmark labelled "Primary", and the active tab uses aria-current="page". The center button has an aria-label, aria-expanded and aria-controls pointing to the actions group, which has role="group". Closed actions are visibility: hidden, so they are skipped by Tab and screen readers. Escape closes the menu and returns focus to the button. The inbox badge contains hidden text ("3 new messages"), icons are aria-hidden, and every control shows a :focus-visible outline. prefers-reduced-motion: reduce turns off the spring and fade transitions.

Usage notes

Several instances can share a page; give each .bnc-actions a unique id and update aria-controls to match.

Bottom Navigation with Center Action Button at a glance

Framework
Pure CSS
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
None
Layout
Responsive, works on mobile
Category
Bottom Navigation
License
Free for personal and commercial use

Questions about this template

Can I use the Bottom Navigation with Center Action Button code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

There is nothing to install. Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

No dependencies. Pure HTML, CSS and JavaScript.

Bottom Navigation with Center Action Button – free Pure CSS bottom navigation template
Bottom Navigation with Center Action Button · free Pure CSS bottom navigation template

More Bottom Navigation

Bottom Navigation Bar with Badges – free Bootstrap 5 bottom navigation template

Bottom Navigation Bar with Badges

Fixed Bootstrap 5 mobile bottom navigation with icons, labels, notification badges, a 9+ overflow badge and a floating pill on desktop.

Bottom Navigation with Floating Indicator – free Tailwind CSS bottom navigation template

Bottom Navigation with Floating Indicator

Tailwind CSS mobile tab bar with a gradient bubble that floats above the bar and slides to the active icon, with keyboard support.

Mobile Bottom Tab Bar – free Tailwind CSS bottom navigation template

Mobile Bottom Tab Bar

Fixed Tailwind CSS bottom tab bar with icons, labels, an active pill, an unread badge, safe-area padding and optional hide-on-scroll.