Skip to content
  • No data uploaded
  • Instant results

Tailwind CSS Navbar for Vue 3 — Glassmorphism

A production-ready glassmorphism navbar: a responsive top navigation bar with a logo, primary links, a sign-in/CTA pair on desktop and a collapsible hamburger menu on mobile. Pick your brand color, toggle dark mode and corner radius — the live preview and the Vue 3 code update instantly in your browser.

Live component editor

Library
Framework
Style
Theme
Corner radius
Live preview
<script setup>
import { ref } from 'vue';

const menu = ref(false);
</script>

<template>
  <header class="sticky top-0 z-10 bg-white/60 backdrop-blur-xl border border-white/60 shadow-2xl">
    <nav class="max-w-6xl mx-auto px-6 py-3 flex items-center justify-between gap-6" aria-label="Main">
      <a href="#" class="flex items-center gap-2 text-lg font-bold no-underline text-slate-900">
        <span class="inline-flex items-center px-2.5 py-0.5 text-xs font-semibold rounded-full bg-[#4f46e5]/10 text-[#4f46e5]">◆</span> Acme
      </a>
      <div class="hidden md:flex items-center gap-6">
        <a href="#" class="text-sm font-medium no-underline text-slate-700">Product</a>
        <a href="#" class="text-sm font-medium no-underline text-slate-700">Solutions</a>
        <a href="#" class="text-sm font-medium no-underline text-slate-700">Pricing</a>
        <a href="#" class="text-sm font-medium no-underline text-slate-700">Docs</a>
      </div>
      <div class="hidden md:flex items-center gap-2">
        <a href="#" class="inline-flex items-center justify-center px-3 py-2 text-sm font-semibold rounded-lg transition-colors text-slate-700 hover:bg-slate-900/5">Sign in</a>
        <a href="#" class="inline-flex items-center justify-center px-4 py-2.5 text-sm font-semibold rounded-lg bg-[#4f46e5] hover:bg-[#433cc3] text-white shadow-sm transition-colors focus:outline-none focus:ring-2 focus:ring-[#4f46e5] focus:ring-offset-2 focus:ring-offset-white">Get started</a>
      </div>
      <button type="button" class="inline-flex items-center justify-center px-3 py-2 text-sm font-semibold rounded-lg transition-colors text-slate-700 hover:bg-slate-900/5 md:hidden" aria-controls="mobile-menu" aria-label="Toggle menu" @click="menu = !menu">☰</button>
    </nav>
    <div id="mobile-menu" v-show="menu">
      <div class="md:hidden px-6 pb-4 flex flex-col gap-1">
        <a href="#" class="inline-flex items-center justify-center px-3 py-2 text-sm font-semibold rounded-lg transition-colors text-slate-700 hover:bg-slate-900/5">Product</a>
        <a href="#" class="inline-flex items-center justify-center px-3 py-2 text-sm font-semibold rounded-lg transition-colors text-slate-700 hover:bg-slate-900/5">Solutions</a>
        <a href="#" class="inline-flex items-center justify-center px-3 py-2 text-sm font-semibold rounded-lg transition-colors text-slate-700 hover:bg-slate-900/5">Pricing</a>
        <a href="#" class="inline-flex items-center justify-center px-3 py-2 text-sm font-semibold rounded-lg transition-colors text-slate-700 hover:bg-slate-900/5">Docs</a>
        <a href="#" class="inline-flex items-center justify-center px-4 py-2.5 text-sm font-semibold rounded-lg bg-[#4f46e5] hover:bg-[#433cc3] text-white shadow-sm transition-colors focus:outline-none focus:ring-2 focus:ring-[#4f46e5] focus:ring-offset-2 focus:ring-offset-white mt-2">Get started</a>
      </div>
    </div>
  </header>
</template>
All components →

Free Tailwind CSS Navbar for Vue 3 — Glassmorphism by pGento

Install Tailwind CSS for Vue 3

Create a Vue 3 project with Vite, then add Tailwind CSS v3:

npm create vite@latest my-app -- --template vue
cd my-app
npm install
npm install -D tailwindcss@3 postcss autoprefixer
npx tailwindcss init -p

Set content: ['./index.html', './src/**/*.{vue,js}'] in tailwind.config.js, and add to src/style.css:

@tailwind base;
@tailwind components;
@tailwind utilities;

The brand color is applied with arbitrary values such as bg-[#4f46e5], so no theme configuration is needed.

Use the navbar in Vue 3

<!-- App.vue -->
<script setup>
import Navbar from './Navbar.vue';
</script>

<template>
  <Navbar />
</template>

Accessibility & customization

Uses a <nav> landmark with aria-label, the menu button exposes aria-controls and aria-label, and links remain real <a> elements so keyboard and screen-reader navigation work without JavaScript.

Every color, radius and dark-mode choice is baked into plain utility classes, so the copied code has no runtime dependency on this site. The glass style relies on backdrop-filter, supported in all current browsers; place it over a colorful background for the best effect.

Compatibility

ItemDetails
CSS frameworkTailwind CSS v3.4+
LibraryVue 3 (<script setup>)
Interactive statemenu
Dark modeYes — toggle in the editor
StyleGlassmorphism (backdrop blur)

Frequently asked questions

How do I install this Tailwind navbar in Vue 3?
Create a Vue 3 project, install Tailwind CSS as shown in the installation section, then paste the generated code.
Can I change the color of the navbar?
Yes. Use the brand color picker or type any hex code — the preview and code update instantly, and the color is written directly into the classes you copy.
Does the navbar support dark mode?
Yes. Toggle “Dark mode” in the editor to generate a dark palette version of the same component.
Is the navbar accessible?
Uses a <nav> landmark with aria-label, the menu button exposes aria-controls and aria-label, and links remain real <a> elements so keyboard and screen-reader navigation work without JavaScript.
Is this component free for commercial use?
Yes. The generated code is yours to use in personal and commercial projects without attribution.
Tailwind CSS Navbar for Vue 3 — Glassmorphism

Embed this tool on your site

Paste this code into any web page. It stays free, fast and ad-free inside your site.

Print or save as PDF

Prints just this tool and its result. Choose “Save as PDF” as the printer to get a file. Branding is stored only in this browser.