@modelcontextprotocol/ext-apps - v1.1.2
    Preparing search index...

    Function getDocumentTheme

    • Get the current document theme from the root HTML element.

      Reads the theme from the data-theme attribute on document.documentElement. Falls back to checking for a dark class for compatibility with Tailwind CSS dark mode conventions.

      Returns McpUiTheme

      The current theme ("light" or "dark")

      const theme = getDocumentTheme();
      document.body.classList.toggle("dark", theme === "dark");