Components/ErrorState
Since 2.4.7BETA

ErrorState

Shortcut empty-state component for error scenarios, based on TxEmptyState with `variant="error"`.

This page was migrated by AI, please review carefully

Migration is complete, but please validate against source code and manual review.

ErrorState

TxErrorState is a shortcut wrapper around TxEmptyState with variant="error" pre-set. Use it for request failures, system errors, and similar scenarios.

Basic Usage

Uses default title and description with action buttons.

ErrorState (basic)

Demo will load when visible.
<template>
  <TxErrorState
    :primary-action="{ label: 'Retry', type: 'primary' }"
    :secondary-action="{ label: 'Go Back' }"
  />
</template>

Custom Content

Override default title and description via props, with surface="card" for card style.

ErrorState (custom)

Demo will load when visible.
<template>
  <TxErrorState
    title="Failed to load data"
    description="The server returned error 500. Please check your network and try again."
    surface="card"
    :primary-action="{ label: 'Retry', type: 'primary' }"
  />
</template>

API

TxErrorState inherits all Props (except variant), Slots, and Events from TxEmptyState. See EmptyState.

Props

PropTypeDefaultDescription
titlestring'Something went wrong'Title (overridable)
descriptionstring'Please try again later.'Description (overridable)
layout'vertical' | 'horizontal''vertical'Layout direction
align'start' | 'center' | 'end''center'Alignment
size'small' | 'medium' | 'large''medium'Size tier
surface'plain' | 'card''plain'Surface style
primaryActionEmptyStateAction-Primary action config
secondaryActionEmptyStateAction-Secondary action config

Full Props reference: EmptyState API

Interaction Contract

  • TxErrorState always forwards variant="error" to TxEmptyState.
  • The wrapper does not rewrite title, description, surface, or action config; explicit props are forwarded as-is.
  • icon, title, description, and actions slots are forwarded unchanged to TxEmptyState.