Skip to content

KCardPro

示例

Card Pro (Type 1)

Main content area with description and actions below.

Description section with extra details.

An advanced card component with type-based layout sections, responsive mobile controls, and a pagination area.

Props

NameTypeDefaultDescription
type'type1' | 'type2' | 'type3''type1'Layout type controlling which sections are rendered and in what order.
borderedbooleanfalseWhether to add a visible border to the card.
classstringAdditional CSS classes for the root element.

Layout types:

  • type1: descriptionArea, actionsArea, searchArea
  • type2: statsArea, searchArea
  • type3: descriptionArea, tabsArea, actionsArea, searchArea

Emits

NameParametersDescription
This component does not emit custom events.

Slots

NameDescription
defaultMain card body content.
headerCard header area.
descriptionAreaDescription section (type1, type3).
actionsAreaActions section (type1, type3). Hidden on mobile with a toggle.
searchAreaSearch section (all types). Hidden on mobile with a toggle.
statsAreaStatistics section (type2).
tabsAreaTabs section (type3).
paginationAreaPagination area at the bottom of the card.

Basic Usage

vue
<script setup>
import { KCardPro } from '@kK-2004/ui-component'
</script>

<template>
  <KCardPro type="type1" bordered>
    <template #header>
      <h2>Users</h2>
    </template>
    <p>List of users goes here.</p>
    <template #actionsArea>
      <button>Add User</button>
    </template>
    <template #searchArea>
      <input type="text" placeholder="Search..." />
    </template>
  </KCardPro>
</template>