Component
Timeline Accordion
Expandable project timeline rendered as a vertical-rail accordion. Each milestone shows date, status dot, and an expandable panel with deliverables and progress.
- Component
- Tailwind
- HTML
- MIT
Preview
Live component
9:41 100%
devsnips.dev/library/tailwind/components/accordions/timeline-accordion/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Components/Accordions/timeline-accordion Tailwind/Components/Accordions/timeline-accordion <!--
Snippet Name: Timeline Accordion
Description: Expandable project timeline. Each milestone is a vertical-rail node with date, status, and an expandable details panel.
Author: DevSnips Contributors
Usage Example: Project dashboards, changelogs, or roadmaps rendered as a chronological accordion.
-->
<ol class="relative space-y-3" data-accordion="timeline" aria-label="Project timeline">
<span class="absolute bottom-4 left-[14px] top-4 w-px bg-gray-200" aria-hidden="true"></span>
<li class="relative pl-10" data-accordion-item>
<span class="absolute left-[7px] top-4 h-3.5 w-3.5 rounded-full border-2 border-white bg-emerald-500 ring-2 ring-emerald-100" aria-hidden="true"></span>
<div class="rounded-xl border border-gray-200 bg-white transition-colors hover:border-gray-300">
<h3>
<button type="button" id="tl-trigger-1" aria-controls="tl-panel-1" aria-expanded="false" class="accordion-trigger flex w-full items-center justify-between gap-4 px-4 py-3 text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-inset rounded-xl">
<span class="min-w-0 flex-1">
<span class="flex items-center gap-2"><span class="rounded-full bg-emerald-50 px-2 py-0.5 text-[11px] font-medium text-emerald-700">Completed</span><span class="text-xs text-gray-400">Mar 2, 2026</span></span>
<span class="mt-1 block text-sm font-semibold text-gray-900">Discovery & research</span>
</span>
<svg class="accordion-chevron h-5 w-5 shrink-0 text-gray-400 transition-transform duration-300 ease-out" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
</h3>
<div id="tl-panel-1" role="region" aria-labelledby="tl-trigger-1" class="accordion-panel grid grid-rows-[0fr] transition-[grid-template-rows] duration-300 ease-out">
<div class="overflow-hidden">
<div class="border-t border-gray-100 px-4 py-3 text-sm text-gray-600">
<p>Interviewed 12 customers and synthesized five recurring pain points. The roadmap now prioritizes onboarding speed and mobile parity ahead of the migration project.</p>
<ul class="mt-3 space-y-1.5 text-xs text-gray-500">
<li class="flex items-center gap-2"><svg class="h-3.5 w-3.5 text-emerald-500" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/></svg> Customer interviews</li>
<li class="flex items-center gap-2"><svg class="h-3.5 w-3.5 text-emerald-500" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/></svg> Competitor analysis</li>
<li class="flex items-center gap-2"><svg class="h-3.5 w-3.5 text-emerald-500" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/></svg> Synthesis doc</li>
</ul>
</div>
</div>
</div>
</div>
</li>
<li class="relative pl-10" data-accordion-item>
<span class="absolute left-[7px] top-4 h-3.5 w-3.5 rounded-full border-2 border-white bg-blue-500 ring-2 ring-blue-100" aria-hidden="true"></span>
<div class="rounded-xl border border-gray-200 bg-white transition-colors hover:border-gray-300">
<h3>
<button type="button" id="tl-trigger-2" aria-controls="tl-panel-2" aria-expanded="false" class="accordion-trigger flex w-full items-center justify-between gap-4 px-4 py-3 text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-inset rounded-xl">
<span class="min-w-0 flex-1">
<span class="flex items-center gap-2"><span class="rounded-full bg-blue-50 px-2 py-0.5 text-[11px] font-medium text-blue-700">In progress</span><span class="text-xs text-gray-400">Mar 18, 2026</span></span>
<span class="mt-1 block text-sm font-semibold text-gray-900">Design system v2</span>
</span>
<svg class="accordion-chevron h-5 w-5 shrink-0 text-gray-400 transition-transform duration-300 ease-out" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
</h3>
<div id="tl-panel-2" role="region" aria-labelledby="tl-trigger-2" class="accordion-panel grid grid-rows-[0fr] transition-[grid-template-rows] duration-300 ease-out">
<div class="overflow-hidden">
<div class="border-t border-gray-100 px-4 py-3">
<p class="text-sm text-gray-600">Migrated 60% of components to the new token set. On track for the April handoff with two designers splitting primitives and patterns.</p>
<div class="mt-3">
<div class="flex items-center justify-between text-xs text-gray-500"><span>Progress</span><span>60%</span></div>
<div class="mt-1 h-1.5 w-full overflow-hidden rounded-full bg-gray-100"><div class="h-full rounded-full bg-blue-500" style="width:60%"></div></div>
</div>
</div>
</div>
</div>
</div>
</li>
<li class="relative pl-10" data-accordion-item>
<span class="absolute left-[7px] top-4 h-3.5 w-3.5 rounded-full border-2 border-gray-300 bg-white" aria-hidden="true"></span>
<div class="rounded-xl border border-gray-200 bg-white transition-colors hover:border-gray-300">
<h3>
<button type="button" id="tl-trigger-3" aria-controls="tl-panel-3" aria-expanded="false" class="accordion-trigger flex w-full items-center justify-between gap-4 px-4 py-3 text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-inset rounded-xl">
<span class="min-w-0 flex-1">
<span class="flex items-center gap-2"><span class="rounded-full bg-gray-100 px-2 py-0.5 text-[11px] font-medium text-gray-600">Upcoming</span><span class="text-xs text-gray-400">Apr 15, 2026</span></span>
<span class="mt-1 block text-sm font-semibold text-gray-900">Mobile parity sprint</span>
</span>
<svg class="accordion-chevron h-5 w-5 shrink-0 text-gray-400 transition-transform duration-300 ease-out" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
</h3>
<div id="tl-panel-3" role="region" aria-labelledby="tl-trigger-3" class="accordion-panel grid grid-rows-[0fr] transition-[grid-template-rows] duration-300 ease-out">
<div class="overflow-hidden">
<div class="border-t border-gray-100 px-4 py-3 text-sm text-gray-600">
<p>Two-week sprint to close mobile gaps identified in research. Kicks off once design tokens ship; engineering has reserved capacity and staged the feature branch.</p>
</div>
</div>
</div>
</div>
</li>
<script>
(function () {
const root = document.currentScript.closest('[data-accordion]');
if (!root) return;
root.querySelectorAll('[data-accordion-item]').forEach((item) => {
const trigger = item.querySelector('.accordion-trigger');
const panel = item.querySelector('.accordion-panel');
const chevron = item.querySelector('.accordion-chevron');
if (!trigger || !panel) return;
const toggle = () => {
const open = trigger.getAttribute('aria-expanded') === 'true';
trigger.setAttribute('aria-expanded', String(!open));
panel.classList.toggle('grid-rows-[1fr]', !open);
panel.classList.toggle('grid-rows-[0fr]', open);
if (chevron) chevron.style.transform = open ? '' : 'rotate(180deg)';
};
trigger.addEventListener('click', toggle);
});
})();
</script>
</ol> # Timeline Accordion
Timeline-styled accordion sections.
## Usage
```bash
npx devsnips add Tailwind/Components/Accordions/timeline-accordion
```
Copy from `code.html`.
## File Structure
`code.html` · `preview.html` · `metadata.json` · `README.md` 105 lines UTF-8 · LF · Spaces: 2
Continue browsing