Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultNavigationPixel Hover Nav
Pixel Dissolve ButtonBrowse all 182Cursor Rail Card List
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Pixel Hover Nav

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

    Setup

    npm i gsap

    More like this

    • Menu
    • Header
    • Pixel
    • Fill
    • SVG

    Features.

    • Every link fills pixel by pixel on hover in a stepped 20-frame sweep, and empties the same way on leave; an interrupted sweep runs back from where it is
    • Labels and the call-to-action arrow slide to a second copy on hover
    • Hover dropdowns with corner marks on wide screens; keyboard focus opens them, Enter steps into them, Escape dismisses them, and a touch screen opens them on tap
    • A "Menu" panel below 992px, with sub-menus that expand on tap; the call to action moves into it below 768px. Focus moves in on open and back to the toggle on close; Escape, an outside tap or tabbing away closes it. Closed links can't take focus
    • The bar slides away while scrolling down and returns on the way up; an open panel or keyboard focus in the bar holds it on screen
    • The pixel mask is generated by the script: no image to host
    • No dependencies, no build step
    • Respects prefers-reduced-motion: states switch without sweeps or slides

    How to get it right.

    Leave room at the top

    The header is position: fixed, so it floats over the page. Give the first section enough top padding (around 4em) that nothing important sits under the bar.

    Match the page colour

    The exit sweep, the panel and the dropdowns all paint --pxn-bg. Set it to the colour behind the header, or the last frame flashes the wrong colour.

    Pick an ink that reads on the hover colour

    --pxn-fill is the link hover colour and --pxn-ink the text on it; --pxn-brand and --pxn-brand-ink do the same for the call to action. A dark fill wants a light ink.

    Write each label twice

    Each link holds two spans with the same text: one slides out, the other in. Change both.

    Keep links shorter than the mask

    The fill layer is 15em wide. Links narrower than that (the default layout) dissolve edge to edge; on a wider link the part past 15em turns solid at the end of the sweep instead of dissolving.

    Pace the sweep

    data-au-frame-duration="28" gives a quick 0.55s sweep that reads as texture. Around 40 the steps start to show; under 20 it reads as a fade.

    Variations.

    • Static bar — data-au-hide-on-scroll="false" keeps the header in place
    • Soft hover — --pxn-fill: #f68e66 for a warm fill on the links
    • Quiet accent — --pxn-brand: #fffcf2 for a monochrome call to action
    • Light page — set --pxn-bg, --pxn-fg, --pxn-border and --pxn-hover to your page and text colours, then --pxn-fill: #252422; --pxn-ink: #fffcf2

    Where it fits.

    • Studio and agency sites — a compact, technical header that rewards a hover
    • Product marketing — sub-menus for features and resources, a strong call to action
    • Pixel or retro brands — slow the frames down and let the steps show
    • Docs and changelogs — mono labels sit well next to code

    Frequently asked.

    Copy an item that has a data-pxn-trigger button and a data-pxn-dropdown block. For a plain link, copy an item with an <a class="pxn_link pxn_pixel"> and no dropdown.

    The sweep runs only on screens 992px and up with a real pointer. Below that the header switches to the panel, where a tap should just navigate. A touch screen at 992px or wider keeps the bar and opens dropdowns on tap.

    The breakpoints are 992px and 768px in code.css; the 992px one is repeated in the two matchMedia lines at the top of code.js. Change both together.

    No. The script builds it once per page and sets it as --pxn-mask on the header.

    No. It's plain JavaScript and CSS.

    Related components.

    NewPro

    Ink Spread Menu

    Click

    Pro

    Folding Burger Nav

    Scroll

    Pro

    Full-Screen Wipe Menu

    Click