---
agentTools:
  projectIndex: https://docs.xkit.co/llms.txt
---

# renderCatalog

Render the catalog into a specific DOM node

### Parameters

1. `el`: `HTMLElement`
   The DOM node that the catalog should be rendered into.
2. `opts` : `object`
   The options for rendering the catalog as specified in [`Configuring xkit-catalog.js`](https://docs.xkit.co/reference/configuring-xkit-catalog-js)

### Returns

[`Catalog`](https://docs.xkit.co/reference/catalog)

`renderCatalog` Renders the full Xkit catalog into a specific DOM node. Using `renderCatalog` requires a bit more surrounding code to determine the right node and if it is available, but provides more flexibility. It is especially useful when rendering Xkit into a Javascript-controlled page.

[block:code]
{
  "codes": [
    {
      "code": "<html>\n  <head>\n\t\t<script src=\"https://<your-slug>.xkit.co/xkit-catalog.js\"></script>\n    // ... assumes jQuery\n  </head>\n  <body>\n    <div id=\"my-special-node\"></div>\n    <script>\n      $(() => {\n        xkit.renderCatalog($(\"#my-special-node\").get(0), {\n          title: \"My Integrations\"\n        })\n      })\n  </body>\n</html>",
      "language": "html"
    }
  ]
}
[/block]

To update the state of the catalog, for example if a button clicked outside should change the current URL, use the returned `pushHistory` function.

[block:code]
{
  "codes": [
    {
      "code": "const catalog = xkit.renderCatalog($(\"#my-special-node\").get(0), {\n  title: \"My Integrations\"\n})\n\n$(\"#back-to-connectors\").click(() => catalog.pushHistory(\"/connectors\"))",
      "language": "javascript"
    }
  ]
}
[/block]