KErrorState
示例
Something went wrong
An error state placeholder with a retry button.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| title | string | 'Oops! Something went wrong' | Heading text for the error state. |
| description | string | — | Secondary description text. |
| class | string | — | Additional CSS classes for the root element. |
| theme | 'auto' | 'day' | 'night' | 'auto' | Theme mode. auto follows the current theme; day and night force a specific mode. |
Emits
| Name | Parameters | Description |
|---|---|---|
| retry | — | Fired when the "Try Again" button is clicked. |
Slots
| Name | Description |
|---|---|
| — | This component does not provide slots. |
Basic Usage
vue
<script setup>
import { KErrorState } from '@kK-2004/ui-component'
</script>
<template>
<KErrorState
title="Failed to load data"
description="Check your network connection and try again."
@retry="fetchData"
/>
</template>