# Double Focus Ring

> A clear two-tone focus ring made with spread shadows, so it follows rounded corners.

- Category: [CSS Box Shadows](https://copy-css.com/category/shadows)
- Tags: focus, ring, accessibility, outline, spread
- Live preview: https://copy-css.com/snippets/focus-ring-shadow
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<button class="ring-focus">Tab to me</button>
```

## CSS

```css
.ring-focus {
  padding: 12px 24px;
  border: 1px solid #d4d4d8;
  border-radius: 10px;
  background: #fff;
  color: #18181b;
  font: 600 15px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.ring-focus:focus-visible,
.ring-focus:hover {
  outline: none;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #2563eb,
    0 0 0 8px rgba(37, 99, 235, 0.2);
}
```

## Notes

- This CSS Double Focus Ring is 19 lines of pure CSS (0.4 KB) with no JavaScript and no dependencies. It uses transitions, box shadows and keyboard focus styles.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
