# Show More Button

> A "Show more" toggle built on details and summary that flips to "Show less" and rotates its chevron.

- Category: [CSS Buttons](https://copy-css.com/category/buttons)
- Tags: details, summary, expand, collapse, read more, chevron
- Live preview: https://copy-css.com/snippets/show-more-button
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<details class="show-more">
  <summary>
    <span class="show-more-closed">Show more</span>
    <span class="show-more-open">Show less</span>
    <svg viewBox="0 0 24 24" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
  </summary>
  <p>Every plan includes unlimited projects, priority support and a 30-day money-back guarantee.</p>
</details>
```

## CSS

```css
.show-more {
  max-width: 320px;
  font: 15px/1.5 system-ui, sans-serif;
  color: #3f3f46;
}

.show-more summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1.5px solid #e4e4e7;
  border-radius: 999px;
  color: #18181b;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.show-more summary::-webkit-details-marker {
  display: none;
}

.show-more summary:hover {
  background: #f4f4f5;
}

.show-more summary:focus-visible {
  outline: 2px solid #18181b;
  outline-offset: 2px;
}

.show-more svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.show-more-open,
.show-more[open] .show-more-closed {
  display: none;
}

.show-more[open] .show-more-open {
  display: inline;
}

.show-more[open] svg {
  transform: rotate(180deg);
}

.show-more p {
  margin: 12px 0 0;
}
```

## Notes

- This CSS Show More Button is 60 lines of pure CSS (1.0 KB) with no JavaScript and no dependencies. It uses transitions, transforms, Flexbox and keyboard focus styles.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
