> ## Documentation Index
> Fetch the complete documentation index at: https://docs.embeddables.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How To: Add external scripts or style libraries in Embeddables

> Two ways to add external scripts or style libraries to your Embeddable

There are two recommended methods to include external JavaScript packages in your Embeddable:

1. **Direct HTML Inclusion (Recommended):** Add the script tag directly to the HTML of the page where you're embedding your Embeddable, alongside the Embeddables embed code.

2. **JavaScript Action Method:** Load the package programmatically through an Action that triggers when the Embeddable loads.

If you choose #2, here's sample code for inserting a `<link>` tag:

```js theme={null}
// All Actions must contain a function called output()
function output() {
  // Add the link tag
  loadStylesheet("<URL>");
}

// Helper function to add a link tag to the head of the page
function loadStylesheet(href) {
  const link = document.createElement("link");
  link.rel = "stylesheet";
  link.href = href;
  document.head.appendChild(link);
}
```
