---
title: Badge
description: JSON Schema for the Badge component.
---

A badge component for displaying status or labels.

```json
{
  "type": "object",
  "properties": {
    "type": {
      "const": "Badge",
      "default": "Badge",
      "type": "string"
    },
    "cssClass": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "CSS/Tailwind classes for styling. Accepts a Responsive() for breakpoint-aware classes."
    },
    "children": {
      "type": "array",
      "items": {
        "$ref": "Component"
      }
    },
    "let": {
      "additionalProperties": true,
      "type": [
        "object",
        "null"
      ],
      "default": null,
      "description": "Scoped bindings available to children. Values are template strings."
    },
    "label": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "Badge text"
    },
    "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"
  ]
}
```
