UIPackage
Menu

Framework

Change language

Boilerplate repo

Collapsible

collapsibleui

Headless single-region show/hide primitive. Use it when Accordion is overkill — a single toggle reveals one panel of content. Smooth height animation built in.

Also available for React ->

Installation

$npx shadcn-vue@latest add https://uipkge.dev/r/vue/collapsible.json
Named registry:npx shadcn-vue@latest add @uipkge/collapsibleInstalls to:app/components/ui/collapsible/

Examples

Loading interactive previews…

Props

NameType / ValuesDefaultRequired
classHTMLAttributes['class']optional

npm dependencies

Used by

Files installed (4)

  • app/components/ui/collapsible/Collapsible.vue0.8 kB
    <script setup lang="ts">
    import type { CollapsibleRootEmits, CollapsibleRootProps } from 'reka-ui'
    import type { HTMLAttributes } from 'vue'
    import { CollapsibleRoot, useForwardPropsEmits } from 'reka-ui'
    
    // CLAUDE.md mandate: bare `defineProps<RekaUiX>()` can bail under Vue 3.5+
    // because reka-ui has no exports.types. The intersection form delegates
    // type extraction to TS via the installed typescript package.
    const props = defineProps<CollapsibleRootProps & { class?: HTMLAttributes['class'] }>()
    const emits = defineEmits<CollapsibleRootEmits>()
    
    const forwarded = useForwardPropsEmits(props, emits)
    </script>
    
    <template>
      <CollapsibleRoot v-slot="slotProps" data-uipkge data-slot="collapsible" v-bind="forwarded">
        <slot v-bind="slotProps" />
      </CollapsibleRoot>
    </template>
    
  • app/components/ui/collapsible/CollapsibleContent.vue0.5 kB
  • app/components/ui/collapsible/CollapsibleTrigger.vue0.5 kB
  • app/components/ui/collapsible/index.ts0.2 kB

Raw manifest:https://uipkge.dev/r/vue/collapsible.json