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

Tailwind CSS Collapse

Preline UI's Tailwind CSS Collapse component represents toggle buttons, to show and hide or collapse and expand content or navigation items, managing its visibility.

Requires JS

Note that this component requires the use of our Collapse plugin, else you can skip this message if you are already using Preline UI as a package.

Collapse (Show/Hide) component enables users to toggle between condensed and expanded views of content, optimizing screen space and providing granular control over information display. The component seamlessly integrates with Tailwind CSS classes, allowing for easy customization to suit various design needs.

Commonly implemented as card toggles, expandable navigation items, or interactive elements in FAQs and product descriptions, the Show/Hide component enhances user engagement and content accessibility. It's ideal for creating responsive, user-friendly interfaces that improve the overall user experience while maintaining a clean design aesthetic.

Default collapse

Use a button trigger to expand and collapse inline content.

Read more toggle

Reveal additional copy inline with a read more and read less trigger.

Destroy and reinitialize

Use the destroy method to remove a collapse instance, then initialize it again when needed.

© 2026 Preline Labs.