{
  "id": "sticky-action-bar",
  "name": "Sticky Action Bar",
  "category": "layouts",
  "tags": [
    "sticky bottom",
    "checkout",
    "mobile",
    "call to action",
    "safe area"
  ],
  "description": "A bottom bar with a price and a buy button that stays in view while the page scrolls, safe-area aware.",
  "url": "https://copy-css.com/snippets/sticky-action-bar",
  "markdown": "https://copy-css.com/snippets/sticky-action-bar.md",
  "html": "<div class=\"action-page\">\n  <div class=\"action-page-content\">\n    <h3>Trail Runner</h3>\n    <p>Light, grippy and made for long days on rough ground.</p>\n    <p>Recycled mesh upper, foam midsole, 8 mm drop.</p>\n    <p>Free returns within 30 days.</p>\n  </div>\n  <div class=\"action-bar\">\n    <span><b>$129</b> incl. tax</span>\n    <a href=\"#\">Add to cart</a>\n  </div>\n</div>",
  "css": ".action-page {\n  background: #ffffff;\n  color: #334155;\n  font: 15px/1.5 system-ui, sans-serif;\n}\n\n.action-page-content {\n  padding: 16px;\n}\n\n.action-page-content h3 {\n  margin: 0 0 6px;\n  color: #0f172a;\n}\n\n.action-page-content p {\n  margin: 0 0 10px;\n}\n\n/* Sticks to the bottom of the screen (or scroll box) */\n.action-bar {\n  position: sticky;\n  bottom: 0;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 12px;\n  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));\n  border-top: 1px solid #e2e8f0;\n  background: #ffffffe6;\n  -webkit-backdrop-filter: blur(8px);\n  backdrop-filter: blur(8px);\n}\n\n.action-bar b {\n  color: #0f172a;\n  font-size: 18px;\n}\n\n.action-bar a {\n  padding: 10px 16px;\n  border-radius: 10px;\n  background: #16a34a;\n  color: #ffffff;\n  font-weight: 600;\n  text-decoration: none;\n  white-space: nowrap;\n}\n\n.action-bar a:hover {\n  background: #15803d;\n}\n\n.action-bar a:focus-visible {\n  outline: 2px solid #15803d;\n  outline-offset: 2px;\n}",
  "features": [
    "backdrop filters",
    "Flexbox",
    "sticky positioning",
    "keyboard focus styles"
  ],
  "customProperties": []
}
