# Shipping Options Radio

> A stacked list of checkout shipping options with delivery times and prices, built on real radio buttons.

- Category: [CSS Form Elements](https://copy-css.com/category/forms)
- Tags: radio, shipping, checkout, delivery, option list, has
- Live preview: https://copy-css.com/snippets/shipping-options-radio
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<fieldset class="ship-opts">
  <legend>Shipping method</legend>
  <label>
    <input type="radio" name="ship" checked>
    <span><strong>Standard</strong>4–6 business days</span>
    <b>Free</b>
  </label>
  <label>
    <input type="radio" name="ship">
    <span><strong>Express</strong>1–2 business days</span>
    <b>$9.90</b>
  </label>
  <label>
    <input type="radio" name="ship">
    <span><strong>Same day</strong>Order before 2 PM</span>
    <b>$19</b>
  </label>
</fieldset>
```

## CSS

```css
.ship-opts {
  width: 100%;
  max-width: 300px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #0f172a;
  font-family: system-ui, sans-serif;
}

.ship-opts legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
}

.ship-opts label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: -1px;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
}

.ship-opts label:first-of-type {
  border-radius: 12px 12px 0 0;
}

.ship-opts label:last-of-type {
  border-radius: 0 0 12px 12px;
}

.ship-opts label:has(:checked) {
  z-index: 1;
  border-color: #0ea5e9;
  background: #f0f9ff;
}

.ship-opts input {
  display: grid;
  flex: none;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  -webkit-appearance: none;
  appearance: none;
}

.ship-opts input:checked {
  border-color: #0ea5e9;
}

.ship-opts input:checked::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0ea5e9;
}

.ship-opts input:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

.ship-opts span {
  display: grid;
  flex: 1;
  color: #64748b;
  font-size: 12px;
}

.ship-opts strong {
  color: #0f172a;
  font-size: 14px;
}

.ship-opts b {
  font-size: 14px;
}
```

## Notes

- This CSS Shipping Options Radio is 88 lines of pure CSS (1.3 KB) with no JavaScript and no dependencies. It uses CSS Grid, Flexbox, the :has() selector and the :checked state (no JavaScript).
- the :has() selector: Chrome 105+, Safari 15.4+, Firefox 121+.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
