# Javascript SDK

The Javascript integration allows you to embed your form in Javascript-powered web apps or web builders like Webflow.

### What you need <a href="#what-you-need" id="what-you-need"></a>

* An active [Feathery](https://feathery.io/) account and form
* Your form's ID. This can be found on the form's settings page on the dashboard.

### Quickstart <a href="#quickstart" id="quickstart"></a>

You can install the JS library from our CDN. Place the following code where you want your form to display. Make sure to replace `SDKKey` and `formId` with your relevant info.

```
<script src="https://cdn.jsdelivr.net/npm/@feathery/react@latest/umd/index.js"></script>
<div id='container'></div>
<script>
(() => {
    Feathery.init('<SDKKey>');
    // Change to true if your form uses Stytch or Firebase for login.
    const loginEnabled = false;
    Feathery.renderAt('container', { formId: '<formId>' }, loginEnabled);
})();
</script>
```

The `Feathery` object is attached at the global scope.

You can automatically copy a JS snippet with the form name and SDK key already inserted by going to any form and clicking the "Javascript" option in the Publish dropdown in the Designer tab.&#x20;

<figure><img src="/files/5qplMoGoPnYmrDwv9erb" alt="" width="300"><figcaption></figcaption></figure>

### API Guide <a href="#api-guide" id="api-guide"></a>

[Same JS methods](/develop/react/api-guide.md) as the React library. `renderAt` replaces the React \<Form/> component.

#### `Feathery.renderAt` <a href="#featheryrenderat" id="featheryrenderat"></a>

Embed your Feathery form into an HTML element with the specified `elementID`. The function returns a [context](/develop/react/api-guide/form/contextref.md#context-properties) object that you can store for purposes such as calling `validateStep`. Additionally, the context object includes a `destroy` method that allows you to unmount the form. If `renderAt` is called multiple times with the same `elementId` then `destroy` will be called automatically before rendering your new form.

|  Parameter  |   Type   | Description                                                                 |
| :---------: | :------: | --------------------------------------------------------------------------- |
| `elementId` | `string` | ID of the element to embed form into.                                       |
|   `props`   | `object` | Same as the [React form props](https://docs.feathery.io/develop/react#form) |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.feathery.io/develop/javascript.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
