---
title: Your first widget
description: Create a Home Screen widget with a few lines of JavaScript.
---

## Write a script

Create a new script in Scriptable and paste the following:

```javascript
// Add this script to a small Scriptable Home Screen widget.
const message = "Hello, world!"

const widget = new ListWidget()
widget.addText(message)

Script.setWidget(widget)
Script.complete()
```

## Add it to your Home Screen

Touch and hold your Home Screen, choose to add a widget, and select Scriptable. Add a small widget, edit it, and choose your script.

## Make it yours

Explore [ListWidget](https://scriptable.app/docs/reference/listwidget.md) to add images and layout, [WidgetText](https://scriptable.app/docs/reference/widgettext.md) to style your text, and [Request](https://scriptable.app/docs/reference/request.md) to fetch data.