Skip to main content
A badge component for displaying status or labels.
{
  "type": "object",
  "properties": {
    "type": {
      "const": "Badge",
      "default": "Badge",
      "type": "string"
    },
    "cssClass": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "CSS/Tailwind classes for styling"
    },
    "label": {
      "description": "Badge text",
      "type": "string"
    },
    "variant": {
      "default": "default",
      "description": "Visual variant: default, secondary, destructive, outline, ghost, success, warning, or info",
      "enum": [
        "default",
        "secondary",
        "destructive",
        "success",
        "warning",
        "info",
        "outline",
        "ghost"
      ],
      "type": "string"
    }
  },
  "required": [
    "type",
    "label"
  ]
}