Accordion

GitHub
Create expandable content sections for better information organization.

Usage

Use the accordion and accordion-item components to display an Accordion in your content.

Yes! While optimized for Nuxt, Pohon UI works perfectly with standalone Vue projects via our Vite plugin. You can follow the installation guide to get started.

::accordion
---
defaultValue:
  - '1'
---

::accordion-item{label="Is Pohon UI free to use?" icon="i-lucide:circle-help"}
Yes! Pohon UI is completely free and open source under the MIT license. All 100+ components are available to everyone.
::

::accordion-item{label="Can I use Pohon UI with Vue without Nuxt?" icon="i-lucide:circle-help"}
Yes! While optimized for Nuxt, Pohon UI works perfectly with standalone Vue projects via our Vite plugin. You can follow the [installation guide](/docs/pohon/getting-started/installation/vue) to get started.
::

::accordion-item{label="Is Pohon UI production-ready?" icon="i-lucide:circle-help"}
Yes! Pohon UI is used in production by thousands of applications with extensive tests, regular updates, and active maintenance.
::

::

API

Props

Prop Default Type

Slots

Slot Type

Theme

We use unocss-variants to customize the theme. Read more about it in the theming guide.

Below is the theme configuration skeleton for the ProseAccordion. Since the component is provided unstyled by default, you will need to fill in these values to apply your own custom look and feel. If you prefer to use our pre-built, opinionated styling, you can instead use our UnoCSS preset, this docs is using it as well.

app.config.ts
export default defineAppConfig({
  pohon: {
    prose: {
      accordion: {
        slots: {
          root: '',
          trigger: ''
        }
      }
    }
  }
};
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import pohon from 'pohon-ui/vite'

export default defineAppConfig({
  pohon: {
    prose: {
      accordion: {
        slots: {
          root: '',
          trigger: ''
        }
      }
    }
  }
};

Changelog

No recent changes