Skip to content

Onyx navbar

A floating pill with the logo, links and one bright button

1280
code.jsx21 lines
<header className="bg-[#0a0a0b] px-4 pt-4 text-[#f2f2ef] sm:px-6 sm:pt-5">  <nav className="mx-auto flex max-w-6xl items-center justify-between rounded-full bg-white/4 py-2 pr-2 pl-5 ring-1 ring-white/10">    <a href="#" className="flex items-center gap-2.5 text-[15px] font-medium tracking-tight">      <svg viewBox="0 0 24 24" className="size-5" aria-hidden="true">        <rect x="2" y="2" width="20" height="20" rx="6" fill="#c6f35e" />        <path d="M7.5 12.5 10.5 15.5 16.5 9" fill="none" stroke="#0a0a0b" strokeWidth="2.25" strokeLinecap="round" strokeLinejoin="round" />      </svg>      Onyx    </a>    <div className="hidden items-center gap-8 text-sm text-white/60 md:flex">      <a href="#" className="transition-colors duration-150 hover:text-white">Product</a>      <a href="#" className="transition-colors duration-150 hover:text-white">Customers</a>      <a href="#" className="transition-colors duration-150 hover:text-white">Pricing</a>      <a href="#" className="transition-colors duration-150 hover:text-white">Changelog</a>    </div>    <div className="flex items-center gap-1">      <a href="#" className="hidden rounded-full px-4 py-2 text-sm text-white/70 transition-colors duration-150 hover:text-white sm:block">Sign in</a>      <a href="#" className="rounded-full bg-[#c6f35e] px-4 py-2 text-sm font-medium text-[#0a0a0b] transition-[scale,background-color] duration-150 ease-out hover:bg-[#d6f886] active:scale-[0.96]">Get started</a>    </div>  </nav></header>

More like this