Show HN: I saw this cool navigation reveal, so I made a simple HTML+CSS version

Published: (February 7, 2026 at 12:45 PM EST)
1 min read

Source: Hacker News

This is a simple code exploration, inspired by (and stolen from) , and originally seen on X here.

Navigation reveal demo

In this example I implement a menu that is revealed when the user clicks a button, using only HTML + CSS (no JavaScript).

Clip‑paths

  1. Reveal circle – The menu is uncovered by a circle that expands from the top‑left corner to the bottom‑right corner. The clip‑path is calculated with:

    clip-path: circle(calc(1.42 * 100vmax) at 0 0);
    • 100vmax uses the larger of the viewport width or height.
    • Multiplying by 1.42 (≈ √2) ensures the circle’s diameter covers the diagonal of the viewport.
  2. Ray polygon – A polygon clip‑path simulates a “ray” effect. The polygon is currently hard‑coded, but it could be generated with JavaScript to adapt dynamically to different navigation dimensions and maintain responsiveness.

Thanks for stopping by.

0 views
Back to Blog

Related posts

Read more »

Build an Accessible Audio Controller

Overview After two days of ARIA theory lessons on freeCodeCamp, the next workshop focused on building an accessible audio controller. The session began with a...

You don't need CSS preprocessor

CSS Pre‑processors: Are They Still Worth It? There was a time when CSS preprocessors seemed like a magical elixir for any CSS problems. It was only necessary to...