Skip to main content
Last updated on
Version: 1.0.0

Accordion

Overview

The expandable section (accordion) allows users to show or hide related content under a header.

The component supports three types:

  • Default

  • Icon

  • Content

Each variant supports three types:

  • Collapse

  • Expand

  • With Action

Default With Text

The default variant uses a text-only header without a leading icon.

Collapse

<h1>Welcome to My Project</h1>
<p>This is a <strong>bold</strong> paragraph with a <a href="/tools">link to our tools</a>.</p>
<h2>Features</h2>
<ul>
<li>Easy <strong>markdown</strong> editing</li>
<li><strong>HTML</strong> export functionality</li>
</ul>

Expand

<h1>Welcome to My Project</h1>
<p>This is a <strong>bold</strong> paragraph with a <a href="/tools">link to our tools</a>.</p>
<h2>Features</h2>
<ul>
<li>Easy <strong>markdown</strong> editing</li>
<li><strong>HTML</strong> export functionality</li>
</ul>

With Action

<h1>Welcome to My Project</h1>
<p>This is a <strong>bold</strong> paragraph with a <a href="/tools">link to our tools</a>.</p>
<h2>Features</h2>
<ul>
<li>Easy <strong>markdown</strong> editing</li>
<li><strong>HTML</strong> export functionality</li>
</ul>

Icon With Text

The icon variant includes a leading icon in the header to represent the content type.

Collapse

<h1>Welcome to My Project</h1>
<p>This is a <strong>bold</strong> paragraph with a <a href="/tools">link to our tools</a>.</p>
<h2>Features</h2>
<ul>
<li>Easy <strong>markdown</strong> editing</li>
<li><strong>HTML</strong> export functionality</li>
</ul>

Expand

<h1>Welcome to My Project</h1>
<p>This is a <strong>bold</strong> paragraph with a <a href="/tools">link to our tools</a>.</p>
<h2>Features</h2>
<ul>
<li>Easy <strong>markdown</strong> editing</li>
<li><strong>HTML</strong> export functionality</li>
</ul>

With Action

<h1>Welcome to My Project</h1>
<p>This is a <strong>bold</strong> paragraph with a <a href="/tools">link to our tools</a>.</p>
<h2>Features</h2>
<ul>
<li>Easy <strong>markdown</strong> editing</li>
<li><strong>HTML</strong> export functionality</li>
</ul>

Content

The content area is revealed when the section is expanded.

<h1>Welcome to My Project</h1>
<p>This is a <strong>bold</strong> paragraph with a <a href="/tools">link to our tools</a>.</p>
<h2>Features</h2>
<ul>
<li>Easy <strong>markdown</strong> editing</li>
<li><strong>HTML</strong> export functionality</li>
</ul>

User Experience

✨ The entire header area should be clickable to toggle expand/collapse.

✨ Expand and collapse indicators must clearly reflect the current state.

✨ Header actions must not trigger expand/collapse when clicked.

✨ Transitions between states should be smooth and fast to provide clear feedback.

✨ Icons should support recognition but never replace meaningful text labels.

✨ Use expanded-by-default sections sparingly to avoid overwhelming users.

✨ Maintain consistent spacing, alignment, and interaction behavior across all sections.

Figma

All details and specifications in the design can be referenced through the Figma link below.

Accordion UI Design