Collapsible Examples

Examples of collapsible content and sidenotes

Collapsible Content Examples

This page demonstrates the collapsible functionality available in TL;DR sections, standalone sections, and sidenotes.

TL;DR Section (Simple)

TL;DR

This is a simple TL;DR summary that appears at the top of content. It uses a clean purple theme and left border to stand out without being too fancy.

TL;DR Section (Multi-paragraph)

TL;DR

This TL;DR demonstrates multiple paragraphs and markdown formatting.

Key Points:

  • Simpler than sidenotes
  • Perfect for content summaries
  • Purple theme for consistency
  • Supports all markdown features

Great for giving readers a quick overview before diving into details!

TL;DR Section (Collapsible - Open by Default)

TL;DR
Show/Hide Summary

TL;DR Section (Collapsible - Closed by Default)

TL;DR
Show/Hide Summary

Standalone Collapsible Section (Collapsed by Default)

Click to expand details

Standalone Collapsible Section (Open by Default)

Click to collapse

Collapsible Sidenote (Info Type)

ℹ️ # Expandable Info
Expandable Info

Collapsible Sidenote with Custom Collapse Title

ℹ️ # Technical Details
Click to show implementation notes

Collapsible Sidenote (Warning Type, Open by Default)

⚠️ # Important Warning
Important Warning

Regular (Non-Collapsible) Sidenote

💡 # Traditional Sidenote

This is a regular sidenote without collapse functionality. It works exactly as before - no changes to existing functionality!

Nested Example

You can also use collapsible sections within regular sidenotes:

⚙️ # Complex Example

This sidenote contains additional collapsible sections within it.

Expand for more details

Pretty cool, right?

Usage Summary

TL;DR Section

{% capture summary %}
Quick summary here...
{% endcapture %}
{% include tldr.html content=summary %}

<!-- Collapsible version -->
{% include tldr.html content=summary collapse=true collapsed=false %}

Standalone Collapsible

{% capture content %}
Your content here...
{% endcapture %}
{% include collapsible.html title="Title" content=content collapsed=true %}

Collapsible Sidenote

{% include sidenote.html 
   title="Badge Title" 
   collapse_title="Caption next to triangle"
   type="info"
   content="Content here" 
   collapse=true 
   collapsed=true 
%}

Parameters

TL;DR:

  • content: Summary text (required)
  • title: Custom label (default: “TL;DR”)
  • collapse: Enable collapse mode (default: false)
  • collapsed: Start collapsed (default: false)
  • collapse_title: Caption next to triangle (default: “Show/Hide Summary”)

Sidenotes:

  • title: Display title in badge (required)
  • collapse_title: Caption next to triangle (optional, defaults to title)
  • content: Content to show/hide (required)
  • collapsed: Start collapsed? (default: true)
  • collapse: Enable collapse in sidenotes (default: false)
  • type: Sidenote style variant (info, warning, tip, important, tldr, context)

© 2025, Ramin Firoozye. All rights reserved.