Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Vue.js
  3. vue-collapsed

vue-collapsed

MITVuev1.3.5

A Vue component for dynamic CSS height transitions from any value to auto and vice versa, perfect for accordions.

Visit WebsiteGitHubGitHub
169 stars8 forks0 contributors

What is vue-collapsed?

Vue Collapsed is a Vue component library that enables smooth CSS height transitions between fixed heights and `auto` values. It solves the common problem of animating height to accommodate dynamic content, such as in accordions or expandable panels, using a declarative Vue API. The component handles transition timing, accessibility, and reduced motion preferences automatically.

Target Audience

Vue developers building interactive UIs with collapsible sections, such as accordions, expandable cards, or togglable content areas. It's particularly useful for those needing reliable height animations without manual CSS workarounds.

Value Proposition

Developers choose Vue Collapsed because it provides a zero-dependency, lightweight solution specifically for Vue that handles the tricky `height: auto` transition seamlessly. Its automatic duration calculation and built-in accessibility features reduce boilerplate while offering fine-grained control via custom transitions and lifecycle events.

Overview

Dynamic CSS height transition from any value to auto and vice versa for Vue. Accordion ready.

Use Cases

Best For

  • Building accessible accordion components in Vue applications
  • Creating smooth expand/collapse animations for dynamic content
  • Implementing togglable FAQ sections or disclosure widgets
  • Animating height transitions between fixed and auto values without CSS hacks
  • Adding collapsible panels to admin dashboards or content-heavy UIs
  • Ensuring motion preferences are respected in interactive Vue components

Not Ideal For

  • Projects using JavaScript frameworks other than Vue (e.g., React or Angular)
  • Teams wanting pre-styled, drop-in accordion components without writing custom CSS
  • Applications requiring complex, multi-step animations beyond simple height transitions
  • Large-scale projects needing a comprehensive animation library with utilities for various effects like fades or slides

Pros & Cons

Pros

Zero Dependencies, Lightweight

The library has no dependencies and a minimal bundle size, as shown by the npm badges indicating 0 dependencies and a small bundle footprint, reducing bloat in Vue projects.

Automatic Duration Optimization

Dynamically calculates transition duration via the --vc-auto-duration CSS variable based on element height, ensuring smooth animations without manual tuning for different content sizes.

Built-in Accessibility Features

Respects user prefers-reduced-motion settings by disabling transitions automatically and provides patterns for adding ARIA attributes, making it easy to implement accessible collapsible sections.

Flexible Transition Control

Supports custom durations, easings, and multi-property transitions through CSS classes and data-collapse attribute states, as demonstrated in the README examples for advanced use cases.

Cons

No Built-in Styling

Requires developers to write all CSS for transitions and styling from scratch, which can be time-consuming for teams looking for quick, out-of-the-box solutions.

Limited to Height Animations

Primarily focused on height transitions; for animations involving other properties like opacity or transforms, additional CSS work is needed, and it might not handle complex animation scenarios seamlessly.

Vue-Specific Lock-in

Designed exclusively for Vue, so it's not portable to other frameworks, which could be a limitation in multi-framework environments or for developers switching stacks.

Frequently Asked Questions

Quick Stats

Stars169
Forks8
Contributors0
Open Issues0
Last commit4 months ago
CreatedSince 2022

Tags

#dynamic-height#animation#css-transitions#vue3#accessibility#frontend#ui-components#vue#vue-component#accordion

Built With

J
JavaScript
C
CSS
V
Vue

Links & Resources

Website

Included in

Vue.js73.6k
Auto-fetched 1 day ago

Related Projects

tiptaptiptap

The headless rich text editor framework for web artisans.

Stars38,812
Forks3,175
Last commit1 day ago
vee-validatevee-validate

✅ Painless Vue forms

Stars11,260
Forks1,297
Last commit7 months ago
form-createform-create

:fire::fire::fire: 强大的低代码动态表单组件,通过 JSON 数据驱动表单渲染,适配移动端,支持可视化设计。提高开发者对表单的开发效率。目前在政务系统、OA系统、ERP系统、电商系统、流程管理等系统中已稳定应用。

Stars7,106
Forks1,105
Last commit15 days ago
vuelidatevuelidate

Simple, lightweight model-based validation for Vue.js

Stars6,864
Forks481
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub