{
  "$schema": "https://design.senvenli.com/schema/component.full.json",
  "kind": "component",
  "family": "feedback",
  "status": "alpha",
  "import": "@senvenli/react/feedback",
  "name": "empty-state",
  "title": "Empty state",
  "exports": [
    "EmptyState"
  ],
  "description": "Explains why a view has no content or failed to load, and offers the action that changes that.",
  "keywords": [
    "empty",
    "no results",
    "error",
    "zero state",
    "retry"
  ],
  "usage": {
    "when": [
      "A list or view has nothing to show yet, no results, or failed to load (tone=\"danger\")."
    ],
    "instead": [
      {
        "use": "banner",
        "when": "Content is present and a message about it is needed."
      },
      {
        "use": "skeleton",
        "when": "The content is still loading."
      }
    ]
  },
  "guidance": [
    {
      "rule": "Never blame the user; say what will appear and how to get it."
    }
  ],
  "a11y": {
    "builtIn": [
      "With announce, the message (title, description, details) is an alert; the actions stay outside it."
    ],
    "youProvide": [
      "A heading level when the state is the page's main content.",
      "For a failed load, a retry Button that shows its pending state (see the example)."
    ]
  },
  "related": [
    "banner"
  ],
  "genui": {
    "expose": false
  },
  "source": [
    "src/feedback/empty-state.tsx"
  ],
  "props": {
    "EmptyState": [
      {
        "name": "icon",
        "type": "IconName",
        "required": true,
        "origin": "own",
        "description": "One Lucide icon; no illustrations.",
        "schema": {
          "type": "string",
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
        }
      },
      {
        "name": "title",
        "type": "React.ReactNode",
        "required": true,
        "origin": "own",
        "description": "First use: what will appear here. No results: repeat the query. Cleared: the calm confirmation."
      },
      {
        "name": "headingLevel",
        "type": "StateHeadingLevel",
        "required": false,
        "origin": "own",
        "description": "Renders the title as a heading where the state is the page's main content; a plain line by default.",
        "schema": {
          "enum": [
            1,
            4,
            2,
            3
          ]
        }
      },
      {
        "name": "description",
        "type": "React.ReactNode",
        "required": false,
        "origin": "own",
        "description": "How the content gets here, or the fix; one or two sentences. Never blame the user."
      },
      {
        "name": "primaryAction",
        "type": "React.ReactNode",
        "required": false,
        "origin": "own",
        "description": "The action that fills the view (`Button variant=\"primary\"`), or \"Clear filters\" for no results."
      },
      {
        "name": "secondaryAction",
        "type": "React.ReactNode",
        "required": false,
        "origin": "own"
      },
      {
        "name": "size",
        "type": "StateSize",
        "required": false,
        "origin": "own",
        "default": "\"medium\"",
        "description": "`compact` inside tables and cards.",
        "schema": {
          "type": "string",
          "enum": [
            "small",
            "medium"
          ]
        }
      },
      {
        "name": "tone",
        "type": "\"neutral\" | \"danger\"",
        "required": false,
        "origin": "own",
        "default": "\"neutral\"",
        "description": "`danger` for a load that failed or a page that is not allowed: the icon in the danger tone.",
        "schema": {
          "type": "string",
          "enum": [
            "neutral",
            "danger"
          ]
        }
      },
      {
        "name": "details",
        "type": "React.ReactNode",
        "required": false,
        "origin": "own",
        "description": "Extra lines inside the message, under the description: an error code and when it happened, for support."
      },
      {
        "name": "announce",
        "type": "boolean",
        "required": false,
        "origin": "own",
        "description": "Announce the message (title, description, details) as an alert; the actions stay outside it. For a state that\nreplaces content the user was waiting for (a failed load); not for a first-use or no-results state.",
        "schema": {
          "type": "boolean"
        }
      }
    ]
  },
  "tokens": [
    "ds-background-danger",
    "ds-radius-xlarge",
    "ds-space-100",
    "ds-space-150",
    "ds-space-200",
    "ds-space-300",
    "ds-space-600",
    "ds-surface-sunken",
    "ds-text",
    "ds-text-subtle"
  ],
  "strings": [],
  "quality": {
    "tests": true,
    "a11y": false,
    "docs": false,
    "visual": false,
    "dark": false,
    "rtl": false,
    "mcp": true,
    "generic": true
  }
}
