All Taste components
Navbar
Navbar — simple
A plain top bar with the logo on the left and the links and sign-up button grouped on the right.
logo · 4 links · log in · primary button · menu button below 640px
"use client";
import { useState } from "react";
import { Menu, X } from "lucide-react";
import { cn } from "@/lib/utils";
const links = [
{ label: "Product", href: "/product" },
{ label: "Pricing", href: "/pricing" },
{ label: "Customers", href: "/customers" },
{ label: "Help", href: "/help" },
];
export function NavbarSimple({ current = "/pricing" }: { current?: string }) {
const [open, setOpen] = useState(false);
return (
<header className="border-b border-border bg-bg font-sans">
<div className="mx-auto flex h-16 max-w-6xl items-center gap-6 px-4 sm:px-7">
<a href="/" className="flex items-center gap-2 text-base font-semibold tracking-tight text-fg">
<span aria-hidden className="size-6 rounded-sm bg-primary" />
Fernbill
</a>
<div className="ml-auto flex items-center gap-2">
<nav aria-label="Main" className="hidden sm:block">
<ul className="flex items-center gap-0.5">
{links.map((l) => (
<li key={l.href}>
<a
href={l.href}
aria-current={l.href === current ? "page" : undefined}
className="inline-flex h-9 items-center rounded px-3 text-sm text-fg-muted transition hover:bg-surface hover:text-fg aria-[current=page]:font-medium aria-[current=page]:text-fg"
>
{l.label}
</a>
</li>
))}
</ul>
</nav>
<span aria-hidden className="mx-1 hidden h-5 w-px bg-border sm:block" />
<a href="/login" className="hidden h-9 items-center rounded px-3 text-sm font-medium text-fg hover:bg-surface-2 sm:inline-flex">Log in</a>
<a href="/signup" className="inline-flex h-9 items-center rounded bg-primary px-3.5 text-sm font-medium text-primary-fg transition hover:bg-primary-hover">Start free</a>
<button
type="button"
aria-label={open ? "Close menu" : "Open menu"}
aria-expanded={open}
onClick={() => setOpen(!open)}
className="inline-grid size-9 place-items-center rounded text-fg hover:bg-surface-2 sm:hidden"
>
{open ? <X className="size-4" /> : <Menu className="size-4" />}
</button>
</div>
</div>
<nav aria-label="Mobile" className={cn("border-t border-border px-4 py-2 sm:hidden", !open && "hidden")}>
{links.map((l) => (
<a key={l.href} href={l.href} className="block rounded px-2 py-2.5 text-[15px] text-fg hover:bg-surface">{l.label}</a>
))}
<a href="/login" className="block rounded px-2 py-2.5 text-[15px] text-fg-muted hover:bg-surface">Log in</a>
</nav>
</header>
);
}
The code uses the Taste Tailwind preset. Make yours on the Taste page with Export my system.