qat

Badge

Badge. It is copied into your app’s ui/ by qatjs add badge: the code is yours to edit.

Example

DeliveredOn the wayFailedNewDraftOnline

Example.qx24 linesOpen in the playground
import Badge from './ui/badge/badge.qx'

export default function Example() {
  return (
    <p class="example-row">
      <Badge tone="success">
        Delivered
      </Badge>
      <Badge tone="warning">
        On the way
      </Badge>
      <Badge tone="danger">
        Failed
      </Badge>
      <Badge tone="info">
        New
      </Badge>
      <Badge>Draft</Badge>
      <Badge tone="success" dot>
        Online
      </Badge>
    </p>
  )
}

Add it

shell1 line
npx qatjs add badge

Badge

As a custom element: <ui-badge>.

Badge: props
PropTypeAttribute
tone'success' | 'warning' | 'danger' | 'info' | 'neutral'yes
dotbooleanyes