Vue Collapsed is a Vue 3 component that provides dynamic CSS height transitions, enabling smooth expansion and collapse animations for elements, typically used in accordions, collapsible panels, or reveal sections. It intelligently handles transitions to and from `height: auto`, which is traditionally challenging to animate natively with CSS transitions. The current stable version is 1.3.5, with frequent patch and minor releases addressing various edge cases, browser compatibility, and performance improvements, indicating an active development cadence. A key differentiator is its automatic calculation of optimal transition durations (`--vc-auto-duration`), which adapts to the element's height for a natural feel. It also offers robust support for custom CSS transitions and detailed animation control via `data-collapse` attributes, allowing for multi-property animations beyond just height. Furthermore, it includes specific optimizations and fixes for Server-Side Rendering (SSR) environments, aiming to minimize layout shifts and ensure consistent visual states on initial page load.
npm install vue-collapsedVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and use the <Collapse /> component within a Vue 3 setup script, toggling its visibility with a reactive state variable and providing extended content to showcase the transition.
Upgrade to `vue-collapsed@1.3.0` or newer to resolve SSR-related layout shifts and ensure consistent initial rendering.
Update to `vue-collapsed@1.3.5` or higher to fix the `TypeError` related to unmounting during transition.
Ensure you are using `vue-collapsed@1.2.8` or newer to correctly handle automatic duration calculations on iOS and for elements in initially hidden containers.
Upgrade to `vue-collapsed@1.3.1` or higher to ensure proper CSS transition detection and behavior in Firefox 124 and later.
Update to `vue-collapsed@1.3.5` or a newer version which includes a fix for this unmount-during-transition error.
Update to `vue-collapsed@1.3.0` or higher to utilize the SSR layout shift fix, ensuring the component renders correctly from the start.
Upgrade to `vue-collapsed@1.2.8` (for iOS) or `vue-collapsed@1.2.7` (for hidden containers) or newer versions to resolve these environment-specific animation issues.
No dependency data recorded yet.