> For the complete documentation index, see [llms.txt](https://developers.felt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.felt.com/js-sdk-api-reference/main/felt.md).

# Felt

***

> `const` **Felt**: { `embed`: `Promise`<[`FeltController`](/js-sdk-api-reference/main/feltcontroller.md)>; `connect`: `Promise`<[`FeltController`](/js-sdk-api-reference/main/feltcontroller.md)>; }

The Felt SDK is a library for embedding Felt maps into your website,\
allowing you to control and inspect the map programmatically.

## Type declaration

### embed()

Embeds a Felt map into the provided container, returning a promise that resolves\
to a [FeltController](/js-sdk-api-reference/main/feltcontroller.md) object that you can use to control the map.

#### Parameters

| Parameter   | Type                                                                 | Description                                  |
| ----------- | -------------------------------------------------------------------- | -------------------------------------------- |
| `container` | `HTMLElement`                                                        | The container element to embed the map into. |
| `mapId`     | `string`                                                             | The ID of the map to embed.                  |
| `options`?  | [`FeltEmbedOptions`](/js-sdk-api-reference/main/feltembedoptions.md) | The options to configure the map.            |

#### Returns

`Promise`<[`FeltController`](/js-sdk-api-reference/main/feltcontroller.md)>

A promise for a [FeltController](/js-sdk-api-reference/main/feltcontroller.md).

### connect()

Binds to an existing Felt map iframe.

#### Parameters

| Parameter    | Type                              | Description                                 |
| ------------ | --------------------------------- | ------------------------------------------- |
| `feltWindow` | `Pick`<`Window`, `"postMessage"`> | The iframe element containing the Felt map. |

#### Returns

`Promise`<[`FeltController`](/js-sdk-api-reference/main/feltcontroller.md)>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://developers.felt.com/js-sdk-api-reference/main/felt.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.
