import { onMounted, ref } from "vue";
import { NNCollapsible } from "@fronntui/vue";
const accordion1 = ref();
const accordion2 = ref();
const accordion3 = ref();
const handleAccordion = (openEntry: string) => {
if (openEntry !== "accordion1") {
accordion1.value.close();
if (openEntry !== "accordion2") {
accordion2.value.close();
if (openEntry !== "accordion3") {
accordion3.value.close();
<div class="my-accordion">
@open="handleAccordion('accordion1')"
<template #header> Header </template>
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ab, sit.
Deserunt dignissimos libero excepturi. Non, ut eveniet laudantium sint
totam, nihil distinctio facere molestiae provident voluptates laborum.
@open="handleAccordion('accordion2')"
<template #header> Header </template>
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ab, sit.
Deserunt dignissimos libero excepturi. Non, ut eveniet laudantium sint
totam, nihil distinctio facere molestiae provident voluptates laborum.
@open="handleAccordion('accordion3')"
<template #header> Header </template>
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ab, sit.
Deserunt dignissimos libero excepturi. Non, ut eveniet laudantium sint
totam, nihil distinctio facere molestiae provident voluptates laborum.
.nn-collapsible:not(:last-of-type) {
background: var(--nn-color-gray-100);
margin-top: var(--nn-spacing-6);
margin-bottom: var(--nn-spacing-5);