# Split Button

> A primary action joined to a caret segment for extra options.

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

## HTML

```html
<div class="btn-split">
  <button type="button">Save draft</button>
  <button type="button" aria-label="More save options">
    <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
  </button>
</div>
```

## CSS

```css
.btn-split {
  display: inline-flex;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.btn-split button {
  display: inline-grid;
  place-items: center;
  padding: 12px 18px;
  border: 0;
  background: #0f766e;
  color: #fff;
  font: 600 15px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease;
}

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

.btn-split button:last-child {
  padding-inline: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0 10px 10px 0;
}

.btn-split button:hover {
  background: #115e59;
}

.btn-split button:focus-visible {
  position: relative;
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}
```

## Notes

- This CSS Split Button is 37 lines of pure CSS (0.7 KB) with no JavaScript and no dependencies. It uses transitions, box shadows, CSS Grid and Flexbox.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
