{
  "id": "show-more-button",
  "name": "Show More Button",
  "category": "buttons",
  "tags": [
    "details",
    "summary",
    "expand",
    "collapse",
    "read more",
    "chevron"
  ],
  "description": "A \"Show more\" toggle built on details and summary that flips to \"Show less\" and rotates its chevron.",
  "url": "https://copy-css.com/snippets/show-more-button",
  "markdown": "https://copy-css.com/snippets/show-more-button.md",
  "html": "<details class=\"show-more\">\n  <summary>\n    <span class=\"show-more-closed\">Show more</span>\n    <span class=\"show-more-open\">Show less</span>\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"m6 9 6 6 6-6\"/></svg>\n  </summary>\n  <p>Every plan includes unlimited projects, priority support and a 30-day money-back guarantee.</p>\n</details>",
  "css": ".show-more {\n  max-width: 320px;\n  font: 15px/1.5 system-ui, sans-serif;\n  color: #3f3f46;\n}\n\n.show-more summary {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  padding: 10px 18px;\n  border: 1.5px solid #e4e4e7;\n  border-radius: 999px;\n  color: #18181b;\n  font-weight: 600;\n  list-style: none;\n  cursor: pointer;\n  transition: background-color 0.15s ease;\n}\n\n.show-more summary::-webkit-details-marker {\n  display: none;\n}\n\n.show-more summary:hover {\n  background: #f4f4f5;\n}\n\n.show-more summary:focus-visible {\n  outline: 2px solid #18181b;\n  outline-offset: 2px;\n}\n\n.show-more svg {\n  width: 18px;\n  height: 18px;\n  fill: none;\n  stroke: currentColor;\n  stroke-width: 2.2;\n  stroke-linecap: round;\n  stroke-linejoin: round;\n  transition: transform 0.2s ease;\n}\n\n.show-more-open,\n.show-more[open] .show-more-closed {\n  display: none;\n}\n\n.show-more[open] .show-more-open {\n  display: inline;\n}\n\n.show-more[open] svg {\n  transform: rotate(180deg);\n}\n\n.show-more p {\n  margin: 12px 0 0;\n}",
  "features": [
    "transitions",
    "transforms",
    "Flexbox",
    "keyboard focus styles"
  ],
  "customProperties": []
}
