A worked example, rendered from real sample data. Sign in to run the tool on your own input.
accent=#6366f1.tabs { display: flex; gap: 2px; border-bottom: 1px solid #e5e7eb; }
.tabs button {
background: transparent; border: 0; padding: 10px 16px;
font-weight: 500; color: #6b7280; cursor: pointer;
border-bottom: 2px solid transparent; margin-bottom: -1px;
transition: color 150ms ease, border-color 150ms ease;
}
.tabs button[aria-selected="true"] { color: #6366f1; border-bottom-color: #6366f1; }
.tabs button:hover:not([aria-selected='true']) { color: #374151; }
Build an accessible tab bar with aria-selected styling + bottom accent. Part of the DevTools Surf developer suite. Browse more tools in the CSS collection.