Blog

Circular tab menu using CSS and JavaScript

Circular six-tab menu built with CSS and JavaScript

A circular tab menu gives a familiar tab interface a fresh radial layout. This tutorial builds an accessible six-item menu with CSS and JavaScript, updating the selected panel whenever a visitor chooses a slice.

Try the live demo · Download source ZIP

How it works

A conic gradient draws six colored sections. Real buttons sit over the wheel and use ARIA tab roles so keyboard and screen reader users can identify the active choice. JavaScript changes the selected state and panel text.

Build the tab list

Place each button inside a tab list, connect it to a tab panel, and expose the selected state with aria-selected. Use arrow keys to move between choices and Home or End to jump to the first or last tab.

<div role="tablist" aria-label="Our solutions">
  <button role="tab" aria-selected="true">Forecast</button>
  <button role="tab" aria-selected="false">Automation</button>
</div>

Draw the circular slices

CSS conic-gradient() creates the colored wedges. Small gaps separate each slice; percentage offsets position the labels evenly around the ring. The layout shrinks on narrow screens while the labels stay horizontal.

.wheel { border-radius: 50%; background: conic-gradient(from -30deg, #25b7db 0 59deg, #101a32 59deg 61deg, #346cf1 61deg 119deg); }

Try the interactive demo

Select a slice or use the arrow keys. Each option updates the text panel below the wheel.

Select a slice. Use Tab to focus a menu item, then arrow keys to move between tabs.

Forecast

Explore clear forecasting tools that turn changing conditions into a plan your team can act on.

Forecast selected.

Try the live demo · Download source ZIP

Conclusion

A radial layout makes a group of choices more visual while retaining familiar tab behavior. CSS draws the wheel; accessible buttons and a small JavaScript handler keep the selection and content in sync.