{
  "id": "shipping-options-radio",
  "name": "Shipping Options Radio",
  "category": "forms",
  "tags": [
    "radio",
    "shipping",
    "checkout",
    "delivery",
    "option list",
    "has"
  ],
  "description": "A stacked list of checkout shipping options with delivery times and prices, built on real radio buttons.",
  "url": "https://copy-css.com/snippets/shipping-options-radio",
  "markdown": "https://copy-css.com/snippets/shipping-options-radio.md",
  "html": "<fieldset class=\"ship-opts\">\n  <legend>Shipping method</legend>\n  <label>\n    <input type=\"radio\" name=\"ship\" checked>\n    <span><strong>Standard</strong>4–6 business days</span>\n    <b>Free</b>\n  </label>\n  <label>\n    <input type=\"radio\" name=\"ship\">\n    <span><strong>Express</strong>1–2 business days</span>\n    <b>$9.90</b>\n  </label>\n  <label>\n    <input type=\"radio\" name=\"ship\">\n    <span><strong>Same day</strong>Order before 2 PM</span>\n    <b>$19</b>\n  </label>\n</fieldset>",
  "css": ".ship-opts {\n  width: 100%;\n  max-width: 300px;\n  margin: 0;\n  padding: 0;\n  border: 0;\n  color: #0f172a;\n  font-family: system-ui, sans-serif;\n}\n\n.ship-opts legend {\n  margin-bottom: 8px;\n  padding: 0;\n  font-size: 14px;\n  font-weight: 700;\n}\n\n.ship-opts label {\n  position: relative;\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  margin-top: -1px;\n  padding: 11px 14px;\n  border: 1px solid #e2e8f0;\n  background: #fff;\n  cursor: pointer;\n}\n\n.ship-opts label:first-of-type {\n  border-radius: 12px 12px 0 0;\n}\n\n.ship-opts label:last-of-type {\n  border-radius: 0 0 12px 12px;\n}\n\n.ship-opts label:has(:checked) {\n  z-index: 1;\n  border-color: #0ea5e9;\n  background: #f0f9ff;\n}\n\n.ship-opts input {\n  display: grid;\n  flex: none;\n  place-items: center;\n  width: 18px;\n  height: 18px;\n  margin: 0;\n  border: 2px solid #cbd5e1;\n  border-radius: 50%;\n  -webkit-appearance: none;\n  appearance: none;\n}\n\n.ship-opts input:checked {\n  border-color: #0ea5e9;\n}\n\n.ship-opts input:checked::before {\n  content: \"\";\n  width: 8px;\n  height: 8px;\n  border-radius: 50%;\n  background: #0ea5e9;\n}\n\n.ship-opts input:focus-visible {\n  outline: 2px solid #0ea5e9;\n  outline-offset: 2px;\n}\n\n.ship-opts span {\n  display: grid;\n  flex: 1;\n  color: #64748b;\n  font-size: 12px;\n}\n\n.ship-opts strong {\n  color: #0f172a;\n  font-size: 14px;\n}\n\n.ship-opts b {\n  font-size: 14px;\n}",
  "features": [
    "CSS Grid",
    "Flexbox",
    "the :has() selector",
    "the :checked state (no JavaScript)",
    "keyboard focus styles"
  ],
  "customProperties": []
}
