Skip to content

KEmptyState

示例

No data found

Try adjusting your search or filters.

A placeholder component displayed when there is no data to show.

Props

NameTypeDefaultDescription
titlestring'No Data'Heading text for the empty state.
descriptionstringSecondary description text.
classstringAdditional CSS classes for the root element.

Emits

NameParametersDescription
This component does not emit custom events.

Slots

NameDescription
iconCustom icon replacing the default database icon.
actionAction 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>