Build a live checklist app

Turn a packing list or a routine into a tap-to-check app. The items live in a data table, so ticks made anywhere — on your phone, in another tab or by your AI assistant — show up instantly.

1. Create the table

Create a table named **Checklist** in your space:

| Column | Type |

|---|---|

| Name | Name (title) — the item |

| Group | Select — e.g. Bag, Clothes |

| Order | Number |

| Done | Checkbox |

Add your items.

2. Create an HTML page

Create an HTML page in the **same space** (pages can only query tables in their own space) and paste:

```html

<title>Checklist</title>

<style>

body { font: 16px system-ui; margin: 16px; }

label { display: block; padding: 10px 0; border-bottom: 1px solid #eee; }

.done { color: #999; text-decoration: line-through; }

</style>

<ul id="list" style="list-style:none;padding:0"></ul>

<script>

const list = document.getElementById("list");

const canEdit = think.capabilities.canEdit;

async function draw() {

const { rows } = await think.executeSql(

'SELECT _id, "Name", "Group", "Done" FROM "Checklist" ORDER BY "Group", "Order"'

);

list.innerHTML = "";

for (const r of rows) {

const label = document.createElement("label");

const box = document.createElement("input");

box.type = "checkbox";

box.checked = r["Done"] === 1;

box.disabled = !canEdit;

box.onchange = async () => {

await think.executeSql('UPDATE "Checklist" SET "Done" = ? WHERE _id = ?', [box.checked ? 1 : 0, r._id]);

draw();

};

label.className = box.checked ? "done" : "";

label.append(box, " ", r["Name"]);

list.append(label);

}

think.ready();

}

addEventListener("think:data", draw); // the table changed elsewhere

draw();

</script>

```

3. Try it

- Tick an item on the page — the table updates.

- Tick an item in the table, or ask your AI assistant to — the page redraws by itself through the `think:data` event. No polling needed.

4. Use it on the go

Open the page on your phone; it runs full screen like an app. Embed it in a text page if you want it next to your notes — see [Embeds](https://openthink.app/n/6eb43cedc7d8).

5. Reset for next time

Add a "Reset" button that clears every tick:

```js

await think.executeSql('UPDATE "Checklist" SET "Done" = 0');

```

Learn more

- [HTML pages](https://openthink.app/n/4727d3d3ab91) and the full [HTML page API](https://openthink.app/n/880ac6e69d53)

- [Data tables](https://openthink.app/n/e4a246ac3902)