KEmptyState
示例
No data found
Try adjusting your search or filters.
A placeholder component displayed when there is no data to show.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| title | string | 'No Data' | Heading text for the empty state. |
| description | string | — | Secondary description text. |
| class | string | — | Additional CSS classes for the root element. |
Emits
| Name | Parameters | Description |
|---|---|---|
| — | — | This component does not emit custom events. |
Slots
| Name | Description |
|---|---|
| icon | Custom icon replacing the default database icon. |
| action | Action content (e.g., a button) displayed below the description. |
Basic Usage
vue
<script setup>
import { KEmptyState } from '@kK-2004/ui-component'
</script>
<template>
<KEmptyState title="No items found" description="Try adjusting your filters.">
<template #action>
<button @click="resetFilters">Reset Filters</button>
</template>
</KEmptyState>
</template>