Kodza

Expanding Pill Menu

A Menu button that grows into the menu around itself: the card widens, then unfolds, Close stays on the button, and each link rises as the edge uncovers it. Grows upward near the bottom.

Navigation No dependencies menuburgernavdialogpill menumobile menu Added Oct 2026
/anim/expanding-pill-menu/ GitHub Fullscreen

With your AI

Just ask.

Say it to your AI. It gets the exact code below, not its best guess, and knows where it goes.

Add the Kodza Expanding Pill Menu to my page.

Not plugged in yet?
claude mcp add -t http kodza https://kodza.dev/api/mcp
Also in Codex, Cursor and VS Code.
kodza-expanding-pill-menu.html
<div class="kodza-expanding-pill">
  <button class="kodza-expanding-pill__toggle" type="button" aria-haspopup="dialog" aria-expanded="false"><span class="kodza-expanding-pill__lines" aria-hidden="true"></span><span class="kodza-expanding-pill__say"><span>Menu</span><span aria-hidden="true">Close</span></span></button>
  <div class="kodza-expanding-pill__panel" role="dialog" aria-modal="true" aria-label="Menu" tabindex="-1" hidden>
    <span class="kodza-expanding-pill__shade" aria-hidden="true"></span>
    <div class="kodza-expanding-pill__float">
      <div class="kodza-expanding-pill__card">
        <button class="kodza-expanding-pill__close" type="button"><span class="kodza-expanding-pill__cross" aria-hidden="true"></span><span class="kodza-expanding-pill__say"><span aria-hidden="true">Menu</span><span>Close</span></span></button>
        <p class="kodza-expanding-pill__label">Five links. That's the site.</p>
        <nav class="kodza-expanding-pill__nav" aria-label="Main">
          <a class="kodza-expanding-pill__link" href="#"><span class="kodza-expanding-pill__mask"><span class="kodza-expanding-pill__word">Work</span></span><span class="kodza-expanding-pill__index">01</span></a>
          <a class="kodza-expanding-pill__link" href="#"><span class="kodza-expanding-pill__mask"><span class="kodza-expanding-pill__word">Studio</span></span><span class="kodza-expanding-pill__index">02</span></a>
          <a class="kodza-expanding-pill__link" href="#"><span class="kodza-expanding-pill__mask"><span class="kodza-expanding-pill__word">Process</span></span><span class="kodza-expanding-pill__index">03</span></a>
          <a class="kodza-expanding-pill__link" href="#"><span class="kodza-expanding-pill__mask"><span class="kodza-expanding-pill__word">Notes</span></span><span class="kodza-expanding-pill__index">04</span></a>
          <a class="kodza-expanding-pill__link" href="#"><span class="kodza-expanding-pill__mask"><span class="kodza-expanding-pill__word">Contact</span></span><span class="kodza-expanding-pill__index">05</span></a>
        </nav>
        <div class="kodza-expanding-pill__foot">
          <a href="#">studio@example.com</a>
          <p class="kodza-expanding-pill__socials"><a href="#">GitHub</a><a href="#">X</a><a href="#">Bluesky</a></p>
        </div>
        <span class="kodza-expanding-pill__dock" aria-hidden="true"></span>
      </div>
    </div>
  </div>
</div>

Checked

Checked before you paste.

Robots poked at it before you did. Every component goes through the same checks, and again each time it changes.

What ranLast run
Accessibilityaxe-core 4.10.2: the WCAG 2.1 A and AA rules, plus best practices. 0 issues
KeyboardThe Tab key gets there, and the focus ring shows when it does. Passed
Reduced motionTurn on reduced motion and what moved just appears. Nothing loops. Passed
Light and darkThe same checks on both themes, contrast included. Passed
WordPressPasted into Twenty Twenty-Five, Twenty Twenty-One, Astra, Blocksy, GeneratePress, Hello Elementor, Kadence and OceanWP. Nothing to flag. 8 / 8 themes
Robots checked this. A human with VoiceOver hasn't yet.
KeyboardPress them in the preview
On the button
  • Opens it on the current link, or the firstEnter/Space
In the menu
  • Next or previous link, round and round↓/↑
  • First or last linkHome/End
  • Stays inside the menu, round and roundTab/⇧Tab
  • Held back, the page behind stays putPage Up/Page Down
Anywhere, while it's open
  • Folds it back into the button, focus on MenuEsc

More like this

More in Navigation