
Description
vue-collapsed is a Vue 3 component that animates an element's height between any value and its full height. Plain CSS cannot transition to an auto height, so this fills that gap. You wrap content in the Collapse component and control it with a boolean when prop. It emits events when expansion and collapse start and when they finish, so you can run code at each stage. A base height sets the collapsed size in pixels, with zero as the default, and the element can render as a tag other than a div. By default the component adds a transition whose duration is calculated from the element's height. For a custom duration or easing, add a class that transitions height. The data-collapse attribute lets you transition other properties, and you can use different easings for expanding and collapsing. The README says it is ready for accordions and links examples and a StackBlitz demo. It suits Vue developers building FAQs, expandable panels or menus.…
Highlights
- Animate height to and from auto
- Accordion-ready
- Expand and collapse events
- Automatic or custom transitions
- Adjustable base height
Ratings & Reviews
No ratings yet
Be the first to rate vue-collapsed.
People also visit

vue-collapsed
Dynamic CSS height transition from any value to auto and vice versa for Vue 3

react-animate-height
Lightweight React component for animating height using CSS transitions

react-collapse
Component-wrapper for collapse animation for elements with variable
vue-collapsed FAQ
What does vue-collapsed do?
It animates an element's height smoothly when it opens and closes, including to and from auto height.
Can I build an accordion with it?
Yes. The README says it is accordion-ready and links examples.
Which events are available?
Expand and collapse each fire at the start, and expanded and collapsed fire when the transition completes.
Can I change the animation speed?
Yes. Add a class that transitions height with your own duration or easing.
What are the best vue-collapsed alternatives?
Popular alternatives to vue-collapsed include vue-collapsed, vue-3-slider-component and react-animate-height. See all vue-collapsed alternatives


















