> For the complete documentation index, see [llms.txt](https://normal-tangerine8609.gitbook.io/html-widget/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://normal-tangerine8609.gitbook.io/html-widget/about/the-function.md).

# The Function

How HTML Widget Works

```javascript
htmlWidget(input: String, debug: Boolean, addons: Object): Promise<ListWidget>
```

Provide the HTML string as the input parameter. The debug parameter is optional and when `true` logs the compiled code. The `addon` parameter is optional and allows for add-ons (see [Add-ons](/html-widget/add-ons/add-ons.md) for more information). A promise is returned, meaning that you will need an `await` to access the returned widget.

```javascript
let widget = await htmlWidget(`
<widget>
  <text>Hello, World!</text>
</widget>
`)
widget.presentSmall()
```
