# Outline Button Group

> A row of joined outline buttons that share borders, ideal for calendar or pager controls.

- Category: [CSS Buttons](https://copy-css.com/category/buttons)
- Tags: joined, toolbar, calendar, attached, actions
- Live preview: https://copy-css.com/snippets/outline-button-group
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="btn-group" role="group" aria-label="Calendar navigation">
  <button type="button" aria-label="Previous month">‹</button>
  <button type="button">Today</button>
  <button type="button" aria-label="Next month">›</button>
</div>
```

## CSS

```css
.btn-group {
  display: inline-flex;
}

.btn-group button {
  min-width: 44px;
  padding: 10px 16px;
  border: 1px solid #d4d4d8;
  background: #fff;
  color: #27272a;
  font: 600 15px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

/* Overlap the borders so they look like one line */
.btn-group button + button {
  margin-left: -1px;
}

.btn-group button:first-child {
  border-radius: 10px 0 0 10px;
}

.btn-group button:last-child {
  border-radius: 0 10px 10px 0;
}

.btn-group button:hover {
  background: #f4f4f5;
}

.btn-group button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #2563eb;
  outline-offset: -1px;
}
```

## Notes

- This CSS Outline Button Group is 38 lines of pure CSS (0.7 KB) with no JavaScript and no dependencies. It uses transitions, Flexbox and keyboard focus styles.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
