A vue.js component to allow a section to collapse and expand with an ainimation.
Vue foldable is built as a vue plugin. It can be initialized just as the Vue documentation states.
import Foldable from "@pderas/vue2-foldable";
Vue.use(Foldable, {
peekabooHeight: 0, // default
});
Vue foldable is easily created, and allows for a slot to be inserted.
<foldable :collapsed="false">
<div slot-scope>
</div>
</foldable>
Property | Required | Type | Default | Description |
---|---|---|---|---|
collapsed | true | Boolean | n/a | If the section is collapsed or not. |
height | false | Number | 0 | The height of foldable. |
minHeight | false | Number | 0 | The minimum height to show of the content. |
This project is covered under the MIT License. Feel free to use it wherever you like.