# Scrollable Tab Bar

> A row of tab links that scrolls sideways on small screens, with snap points and a faded edge hint.

- Category: [CSS Navigation](https://copy-css.com/category/navigation)
- Tags: overflow, horizontal scroll, scroll-snap, mobile, mask, categories
- Live preview: https://copy-css.com/snippets/scrollable-tabs
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<nav class="scroll-tabs" aria-label="Categories">
  <a href="#" aria-current="page">All</a>
  <a href="#">Design</a>
  <a href="#">Development</a>
  <a href="#">Marketing</a>
  <a href="#">Product</a>
  <a href="#">Research</a>
</nav>
```

## CSS

```css
.scroll-tabs {
  display: flex;
  max-width: 260px;
  overflow-x: auto;
  padding: 0 32px 0 4px;
  border-bottom: 1px solid #e5e7eb;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  font: 600 14px system-ui, sans-serif;
  -webkit-mask: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
  mask: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}

.scroll-tabs::-webkit-scrollbar {
  display: none;
}

.scroll-tabs a {
  flex: none;
  padding: 12px 12px 10px;
  border-bottom: 2px solid transparent;
  color: #6b7280;
  text-decoration: none;
  scroll-snap-align: start;
}

.scroll-tabs a:hover {
  color: #111827;
}

.scroll-tabs a[aria-current="page"] {
  border-bottom-color: #e11d48;
  color: #e11d48;
}

.scroll-tabs a:focus-visible {
  border-radius: 6px;
  outline: 2px solid #e11d48;
  outline-offset: -2px;
}
```

## Notes

- This CSS Scrollable Tab Bar is 40 lines of pure CSS (0.8 KB) with no JavaScript and no dependencies. It uses linear gradients, masks, Flexbox and scroll snapping.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
