Live Demo: https://vue-accordion.lib.ztrehagem.dev/
npm install @ztrehagem/vue-accordion
-
(Recommended/Optional) Import default style.
This is a minimum style for achieving the behavior of accordion. (source)
import "@ztrehagem/vue-accordion/style.css";
-
Import and use VueAccordion component.
import { VueAccordion } from "@ztrehagem/vue-accordion"; export default { components: { VueAccordion, }, };
<VueAccordion :expanded="isExpanded"> <strong>Hello World!</strong> </VueAccordion>
See src for more examples.