{
  "$schema": "https://design.senvenli.com/schema/component.full.json",
  "kind": "component",
  "family": "action",
  "status": "alpha",
  "import": "@senvenli/react/action",
  "name": "theme-switcher",
  "title": "Theme switcher",
  "exports": [
    "ThemeSwitcher"
  ],
  "description": "Lets people choose system, light or dark theme, stored per device and applied before first paint.",
  "keywords": [
    "theme",
    "dark mode",
    "light mode",
    "appearance"
  ],
  "usage": {
    "when": [
      "An app or site offers light and dark themes."
    ],
    "instead": [
      {
        "use": "switch",
        "when": "Only two themes exist and the system option is not offered."
      },
      {
        "use": "menu",
        "when": "The theme choice sits among other account settings."
      }
    ]
  },
  "a11y": {
    "keyboard": [
      {
        "keys": "Arrow keys",
        "does": "Moves between and selects the options."
      }
    ],
    "builtIn": [
      "One tab stop; a radio group named \"Theme\".",
      "System says which theme is in effect now."
    ],
    "youProvide": []
  },
  "genui": {
    "expose": false
  },
  "source": [
    "src/action/theme-switcher.tsx"
  ],
  "props": {
    "ThemeSwitcher": [
      {
        "name": "value",
        "type": "ThemeChoice",
        "required": false,
        "origin": "own",
        "description": "Controlled choice; leave out to let the toggle manage, store and apply it.",
        "schema": {
          "type": "string",
          "enum": [
            "system",
            "light",
            "dark"
          ]
        }
      },
      {
        "name": "onChange",
        "type": "(choice: ThemeChoice) => void",
        "required": false,
        "origin": "own"
      },
      {
        "name": "labels",
        "type": "Partial<ThemeLabels>",
        "required": false,
        "origin": "own",
        "description": "Localized names; the locale's built-in strings by default."
      },
      {
        "name": "storageKey",
        "type": "string",
        "required": false,
        "origin": "own",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "variant",
        "type": "\"list\" | \"menu\" | \"segmented\"",
        "required": false,
        "origin": "own",
        "default": "\"segmented\"",
        "description": "`segmented`: three icon buttons. `menu`: one icon button (the theme in effect) that opens System / Light / Dark,\nthe compact form for a busy header. `list`: a three-option list with a check, for the phone menu.",
        "schema": {
          "type": "string",
          "enum": [
            "list",
            "menu",
            "segmented"
          ]
        }
      }
    ]
  },
  "tokens": [
    "ds-background-neutral",
    "ds-background-neutral-bold",
    "ds-background-neutral-pressed",
    "ds-background-neutral-subtle-hovered",
    "ds-background-segment-selected",
    "ds-border-focused",
    "ds-icon",
    "ds-icon-subtle",
    "ds-radius-control-medium",
    "ds-radius-large",
    "ds-radius-medium",
    "ds-radius-small",
    "ds-shadow-overlay",
    "ds-shadow-raised",
    "ds-size-control",
    "ds-space-050",
    "ds-space-100",
    "ds-space-150",
    "ds-surface-overlay",
    "ds-text",
    "ds-text-inverse",
    "ds-text-subtle"
  ],
  "strings": [
    "theme",
    "themeDark",
    "themeLight",
    "themeNowDark",
    "themeNowLight",
    "themeSystem"
  ],
  "quality": {
    "tests": true,
    "a11y": false,
    "docs": false,
    "visual": false,
    "dark": false,
    "rtl": false,
    "mcp": true,
    "generic": true
  }
}
