# Custom Select

> A native select restyled with a custom chevron. Still fully accessible.

- Category: [CSS Form Elements](https://copy-css.com/category/forms)
- Tags: select, dropdown, chevron, appearance, form
- Live preview: https://copy-css.com/snippets/custom-select
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<select class="select" aria-label="Framework">
  <option>Vanilla CSS</option>
  <option>PostCSS</option>
  <option>Sass</option>
</select>
```

## CSS

```css
.select {
  width: 220px;
  padding: 12px 40px 12px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
  color: #111;
  font: 15px system-ui, sans-serif;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.select:focus {
  border-color: #6366f1;
  outline: none;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}
```

## Notes

- This CSS Custom Select is 18 lines of pure CSS (0.6 KB) with no JavaScript and no dependencies. It uses box shadows.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
