CSS Circle Reveal Menu
A round hamburger button whose menu panel grows out of it in an expanding circle, made with clip-path.
<details class="circle-menu">
<summary aria-label="Menu"><span></span></summary>
<nav aria-label="Main">
<a href="#">Home</a>
<a href="#">Projects</a>
<a href="#">About</a>
<a href="#">Contact</a>
</nav>
</details>
.circle-menu {
position: relative;
display: inline-block;
font: 600 15px system-ui, sans-serif;
}
.circle-menu summary {
position: relative;
z-index: 2;
display: grid;
place-items: center;
width: 48px;
height: 48px;
border-radius: 50%;
background: #7c3aed;
list-style: none;
cursor: pointer;
}
.circle-menu summary::-webkit-details-marker {
display: none;
}
.circle-menu summary:focus-visible {
outline: 2px solid #7c3aed;
outline-offset: 3px;
}
/* Three lines that fold into an X */
.circle-menu summary span,
.circle-menu summary span::before,
.circle-menu summary span::after {
display: block;
width: 18px;
height: 2px;
border-radius: 2px;
background: #ffffff;
transition: transform 0.25s ease, background-color 0.25s ease;
}
.circle-menu summary span {
position: relative;
}
.circle-menu summary span::before,
.circle-menu summary span::after {
content: "";
position: absolute;
left: 0;
}
.circle-menu summary span::before {
top: -6px;
}
.circle-menu summary span::after {
top: 6px;
}
.circle-menu[open] summary span {
background: transparent;
}
.circle-menu[open] summary span::before {
transform: translateY(6px) rotate(45deg);
}
.circle-menu[open] summary span::after {
transform: translateY(-6px) rotate(-45deg);
}
.circle-menu nav {
position: absolute;
top: 0;
left: 0;
z-index: 1;
display: grid;
gap: 2px;
box-sizing: border-box;
width: 200px;
padding: 64px 12px 12px;
border-radius: 24px;
background: #2e1065;
animation: circle-menu-reveal 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.circle-menu nav a {
padding: 10px 12px;
border-radius: 10px;
color: #ede9fe;
text-decoration: none;
}
.circle-menu nav a:hover {
background: #4c1d95;
}
.circle-menu nav a:focus-visible {
outline: 2px solid #c4b5fd;
outline-offset: -2px;
}
/* The circle starts at the button center (24px 24px) */
@keyframes circle-menu-reveal {
from { clip-path: circle(24px at 24px 24px); }
to { clip-path: circle(150% at 24px 24px); }
}
@media (prefers-reduced-motion: reduce) {
.circle-menu nav { animation: none; }
}
About this CSS Circle Reveal Menu
This CSS Circle Reveal Menu is 111 lines of pure CSS (2.1 KB) with no JavaScript and no dependencies. It uses keyframe animations, transitions, transforms and clip paths. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.
CSS features used
- keyframe animations
- transitions
- transforms
- clip paths
- CSS Grid
- keyboard focus styles
- reduced-motion support
Customize it
The colors in this snippet. Search and replace them to match your brand:
#7c3aed#ffffff#2e1065#ede9fe#4c1d95#c4b5fd
How to use this circle reveal menu
- Copy the HTML and paste it where you want the element to appear.
- Copy the CSS into your stylesheet, or inside a
<style>tag. - Keep the
.circle-menuclass name, or rename it in both places. Then tweak colors, sizes and timing to match your design. - Using React or Next.js? Change
classtoclassNamein the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).
Building with an AI tool?
“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.