UIPackage

Section Card

Vue layout
Edit on GitHub

Card variant tuned for settings pages — title, description, and content slots, with optional footer for save/cancel actions. The block-level building block for `.../settings/*` routes.

Also available for React ->

Installation

$ npx shadcn-vue@latest add https://uipkge.dev/r/vue/section-card.json

Or with the named registry: npx shadcn-vue@latest add @uipkge/section-card

Examples

Props

Name Type / Values Default Required
title string required
description string optional
class string optional
contentClass string optional

Dependencies

Used by

Files (2)

  • app/components/ui/section-card/SectionCard.vue 0.8 kB
    <script setup lang="ts">
    import { cn } from '@/lib/utils'
    import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'
    
    const props = defineProps<{
      title: string
      description?: string
      class?: string
      contentClass?: string
    }>()
    </script>
    
    <template>
      <Card :class="cn('flex flex-col', props.class)">
        <CardHeader class="pb-4">
          <div class="flex items-center justify-between">
            <div>
              <CardTitle class="text-base font-semibold">{{ title }}</CardTitle>
              <CardDescription v-if="description" class="mt-0.5">{{ description }}</CardDescription>
            </div>
            <slot name="header-action" />
          </div>
        </CardHeader>
        <CardContent :class="cn('flex-1', props.contentClass)">
          <slot />
        </CardContent>
        <slot name="footer" />
      </Card>
    </template>
  • app/components/ui/section-card/index.ts 0.1 kB
    export { default as SectionCard } from './SectionCard.vue'

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