# Outline Button Set

> Outlined buttons in primary, neutral and danger colors that fill solid on hover, themed with one variable.

- Category: [CSS Buttons](https://copy-css.com/category/buttons)
- Tags: outlined, primary, danger, variants, custom property
- Live preview: https://copy-css.com/snippets/outline-button-set
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<button class="btn-outline">Save</button>
<button class="btn-outline btn-outline-neutral">Cancel</button>
<button class="btn-outline btn-outline-danger">Delete</button>
```

## CSS

```css
.btn-outline {
  --btn-color: #2563eb;
  padding: 12px 24px;
  border: 2px solid var(--btn-color);
  border-radius: 10px;
  background: transparent;
  color: var(--btn-color);
  font: 600 15px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
  background: var(--btn-color);
  color: #fff;
}

.btn-outline:focus-visible {
  outline: 3px solid var(--btn-color);
  outline-offset: 3px;
}

.btn-outline-neutral {
  --btn-color: #3f3f46;
}

.btn-outline-danger {
  --btn-color: #dc2626;
}
```

## Notes

- This CSS Outline Button Set is 29 lines of pure CSS (0.5 KB) with no JavaScript and no dependencies. It uses transitions, keyboard focus styles and custom properties.
- Customize with: `--btn-color`.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
