Trên trang này

Trang này chưa có bản tiếng Việt, nội dung bên dưới là bản tiếng Anh. Xem trang tiếng Anh

Accordion

Install, props and the parts Accordion is built from.

Install

Run this in the app, after shadcn-vue init and the Beehexa theme (Button › Code):

npx shadcn-vue@latest add https://beehexa.design/r/accordion.json

Use

<script setup lang="ts">
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'
</script>

<template>
  <div>
    <Accordion type="single" collapsible>
      <AccordionItem value="sync">
        <AccordionTrigger>How often do orders sync?</AccordionTrigger>
        <AccordionContent>Every 15 minutes, or when you press Sync now.</AccordionContent>
      </AccordionItem>
    </Accordion>
  </div>
</template>

Props

Part Prop Values Notes
Accordion type, collapsible, default-value single/multiple, boolean, string

Built on

reka-ui AccordionRoot, as the shadcn-vue Accordion. The open and close animations are shadcn’s.