Update v4.2 - New components, 10+ framework guides, and quality improvements. Visit Changelog

Tailwind CSS Accordion

Create collapsible content sections with Tailwind CSS accordion examples, including nested, bordered, and always-open variants.

Requires JS

This page requires our Accordion plugin. You can skip this step if you're already using Preline UI as a package.

Default accordion

Click an item to reveal its panel content.

Always open

Use data-hs-accordion-always-open to keep multiple accordion items open at the same time.

Nested

Nest one accordion inside another panel to reveal subitems.

Without arrow

Remove the default indicators for a cleaner text-only trigger.

With arrow indicator

Add an arrow to make the expanded and collapsed states easier to scan.

Separated title and arrow

Stretch the trigger content so the title stays left and the arrow aligns to the right.

Bordered

Wrap each accordion item in borders to create more defined sections.

Bordered open content

Add borders around the expanded panel content to emphasize the open state.

Destroy and reinitialize

Use the destroy method to remove an accordion instance and initialize it again when needed.

© 2026 Preline Labs.