Skip to main content
Tab container — children must be Tab components.
{
  "type": "object",
  "properties": {
    "type": {
      "const": "Tabs",
      "default": "Tabs",
      "type": "string"
    },
    "cssClass": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "CSS/Tailwind classes for styling"
    },
    "children": {
      "type": "array",
      "items": {
        "$ref": "Component"
      }
    },
    "variant": {
      "default": "default",
      "description": "Visual style \u2014 'default' (pill) or 'line' (underline)",
      "enum": [
        "default",
        "line"
      ],
      "type": "string"
    },
    "defaultValue": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "Value of the initially active tab"
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "State key for tracking the active tab"
    },
    "onChange": {
      "$ref": "Action",
      "description": "Action(s) when the active tab changes",
      "default": null
    }
  },
  "required": [
    "type"
  ]
}