> For the complete documentation index, see [llms.txt](https://developer.singular.live/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.singular.live/software-development-kits/widget-sdk.md).

# Widget SDK

The Singular Widget SDK is a JavaScript library that allows you to develop your own widgets and extend Composer's functionality.

A widget is like a small web page hosted in an iframe that can connect to external data sources and manage and update its HTML elements. Using this SDK, you can write code in JavaScript, HTML, and CSS and leverage your preferred libraries to build powerful and intuitive widgets.

The Singular Widget SDK provides classes and methods to manage initialization, data updates, and animation states.

### What can you do with Singular widgets? <a href="#what-can-singular-apps-do" id="what-can-singular-apps-do"></a>

Singular widgets are versatile. Among other things, you can use them to:

* Visualize content
* Access external data sources and data service&#x20;
* Manage instances of widget compositions
* Define internal animation logic
* Send and receive messages to a composition script

{% hint style="info" %}
If you're new to JavaScript and web development, check out these [resources](/support/support-resources.md#javascript) to learn basic concepts and techniques.
{% endhint %}


---

# 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, and the optional `goal` query parameter:

```
GET https://developer.singular.live/software-development-kits/widget-sdk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
