X Enterprises
Data

DataStatusBadge

Badge that auto-maps common status strings to semantic colors.

Data

Data components handle the rendering of structured information in detail views, sidebars, and list pages. They cover everything from a single formatted number to a full activity feed with date grouping.

Components

<XADataStatusBadge />

A UBadge wrapper that automatically maps common status string values to semantic colors. Supports a custom colorMap to extend or override defaults.

Built-in mappings include:

  • success: active, completed, approved, success, paid, delivered, published, verified, online
  • warning: pending, review, processing, draft, scheduled
  • error: failed, rejected, error, cancelled, overdue, blocked
  • neutral: inactive, archived, unknown
<XADataStatusBadge status="active" />
<XADataStatusBadge status="pending" />
<XADataStatusBadge status="custom-state" :color-map="{ 'custom-state': 'info' }" />

Props

PropTypeDefaultDescription
statusstring''Status string — auto-mapped to a color.
labelstring''Custom display label (defaults to capitalized status).
colorstring''Override the auto-mapped color.
colorMapobject{}Additional status-to-color mappings merged with the defaults.
variantstring'soft'UBadge variant.
sizestring'sm'UBadge size.
badgeClassstring''Extra CSS classes.

AI Context

component: XADataStatusBadge
package: "@xenterprises/nuxt-x-app"
auto-import: true
prefix: XA
category: Data
use-when: Rendering a status string as a color-coded badge in table cells, detail panels, or list rows. Has a built-in color map; extend with the colorMap prop for custom statuses.
built-in-statuses:
  success: [active, completed, approved, success, paid, delivered, published, verified, online]
  warning: [pending, review, processing, draft, scheduled]
  error: [failed, rejected, error, cancelled, overdue, blocked]
  neutral: [inactive, archived, unknown]
Copyright © 2026