Skip to content

Section Accordion

A grouped accordion with animated underline indicators and smooth height transitions between sections.

Section Accordion

by FreeCsStyles Dev's

AccordionsMinimal
🌐
#accordion#sections#settings#nested

Embed this component

Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/section-accordion.

<iframe src="/embed/section-accordion" sandbox="allow-scripts" loading="lazy" title="Section Accordion" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>

Implementation code

Copy the HTML and CSS for Section Accordion. The HTML and CSS variants are self-contained; framework variants assume that framework's project setup.

HTML
<div class="section-acc">
  <div class="acc-item active">
    <span class="acc-icon">⚙️</span>
    <div class="acc-body">
      <div class="acc-title">General Settings</div>
      <div class="acc-desc">Profile, preferences, and appearance</div>
    </div>
    <span class="acc-arrow">›</span>
  </div>
  <div class="acc-item">
    <span class="acc-icon">🔔</span>
    <div class="acc-body">
      <div class="acc-title">Notifications</div>
      <div class="acc-desc">Email, push, and in-app alerts</div>
    </div>
    <span class="acc-arrow">›</span>
  </div>
  <div class="acc-item">
    <span class="acc-icon">🔒</span>
    <div class="acc-body">
      <div class="acc-title">Security</div>
      <div class="acc-desc">Password, 2FA, and devices</div>
    </div>
    <span class="acc-arrow">›</span>
  </div>
</div>
CSS
.section-acc { max-width: 320px; border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; overflow: hidden; }

.acc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  position: relative;
  transition: background 0.3s ease;
}

.acc-item:last-child { border-bottom: none; }

.acc-item:hover { background: rgba(255, 255, 255, 0.04); }

.acc-item.active { background: rgba(139, 92, 246, 0.06); }

.acc-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #8b5cf6, #06b6d4);
}

.acc-icon { font-size: 20px; }

.acc-body { flex: 1; }

.acc-title { font-size: 13.5px; font-weight: 700; color: rgba(255, 255, 255, 0.9); }

.acc-desc { font-size: 11.5px; color: rgba(255, 255, 255, 0.4); margin-top: 3px; }

.acc-arrow {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.acc-item.active .acc-arrow {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  transform: rotate(90deg);
}

Where Section Accordion fits

  • Settings Panels
  • Onboarding
  • Documentation

Topics

  • #accordion
  • #sections
  • #settings
  • #nested