UIPackage
Menu

Framework

Change language

Boilerplate repo

Card

cardui

Bordered container with an opinionated header / content / footer layout. Use it as the wrapper around any self-contained block of content — settings panels, dashboard tiles, list cells.

Also available for React ->

Installation

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

Examples

Loading interactive previews…

Props

NameType / ValuesDefaultRequired
variant
'default''elevated''outline''ghost'
optional
classHTMLAttributes['class']optional

npm dependencies

Used by

Files installed (9)

  • app/components/ui/card/Card.vue0.5 kB
    <script setup lang="ts">
    import type { HTMLAttributes } from 'vue'
    import { cn } from '@/lib/utils'
    import { cardVariants } from './card.variants'
    
    // Inlined union: SFC compiler can't extract runtime props from
    // `CardVariants['variant']`.
    const props = defineProps<{
      variant?: 'default' | 'elevated' | 'outline' | 'ghost'
      class?: HTMLAttributes['class']
    }>()
    </script>
    
    <template>
      <div data-uipkge data-slot="card" :class="cn(cardVariants({ variant }), 'overflow-hidden', props.class)">
        <slot />
      </div>
    </template>
    
  • app/components/ui/card/CardAction.vue0.4 kB
  • app/components/ui/card/CardContent.vue0.3 kB
  • app/components/ui/card/CardDescription.vue0.3 kB
  • app/components/ui/card/CardFooter.vue0.3 kB
  • app/components/ui/card/CardHeader.vue0.5 kB
  • app/components/ui/card/CardTitle.vue0.4 kB
  • app/components/ui/card/card.variants.ts1 kB
  • app/components/ui/card/index.ts0.6 kB

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