---
title: Linked text and buttons in TerminalWidget
date: 2026-08-08 06:56
slug: linked-text-and-buttons-in-terminalwidget
categories:
- Blog
- Code
tags:
- linking
- tables
- scripting
- terminalwidget
- widgets
- markdown
- launcher
- shortcuts
---

[TerminalWidget]: https://terminalwidget.app

Widgets that just sit there and look pretty are fine. Widgets you can tap into are better. [TerminalWidget] now leans into that with markdown links in body text and table cells, plus a proper launcher button footer.

Credit where it's due: this feature was inspired by scripting legend Rob Trew. I initially thought it wasn't possible, but a little prod from them got things rolling.

By the way, TerminalWidget has spent a week in the #1 slot in Developer Tools on Mac and iOS!

### Markdown links in text

![Widget showing linked text](https://brettterpstra.com/uploads/2026/08/linkedtext.jpg)

Pass Markdown-style links in `--text` (or JSON `text`) and they render as tappable labels on macOS and iOS:

```bash
terminal-widget --target widget1 \
  --text 'Status: [open dashboard](https://example.com/dash)'
```

URLs need a scheme (`https://`, `mailto:`, and custom handlers). Broken or schemeless markup stays literal, so you are not stuck with half-parsed junk. Tap the link to open it; tap elsewhere and the usual whole-widget `--action-kind` still fires.

One small gotcha: `--fit-text` backs off when links are present so hit targets stay usable.

### Links in table cells too

Tables get the same treatment. CSV, TSV, and JSON cells — headers included — parse `[label](url)` the same way `--text` does:

```bash
terminal-widget --target widget1 --table $'Name,Link\nDocs,[CLI](https://terminalwidget.app/cli/)'
```

Column width measures the visible label text, not the raw markdown, so layout does not blow up around long URLs. Quote CSV cells when a URL contains commas, same as any other CSV gotcha.

### Launcher buttons

![Widget showing buttons](https://brettterpstra.com/uploads/2026/08/buttons-400.jpg)

Want a grid of actions under the content? Ship a `buttons` array in JSON (up to 12). Each button gets a label, color, action type, and action value — open a URL, run a Shortcut, refresh, and on Mac also open apps or run commands:

```bash
terminal-widget --target widget1 --json '{
  "text": "Quick actions",
  "button-columns": 2,
  "buttons": [
    {
      "label": "Docs",
      "color": "#4A90D9",
      "action-type": "open-url",
      "action-value": "https://terminalwidget.app"
    },
    {
      "label": "Refresh",
      "color": "#34C759",
      "action-type": "refresh",
      "action-value": ""
    }
  ]
}'
```

Buttons sit in a footer under text, charts, progress, images, or tables — or alone as a buttons-only widget. Optional icons, borders, and `button-columns` (`smart` / `1` / `2` / `3`) let you tune the layout without fighting the content above.

### They stick around (until you clear them)

Buttons are part of the target payload. Append chart points, swap the text, refresh an image — if you do not send a new `buttons` array, the footer stays put. Same idea as other persisted fields: omit to keep, send to replace.

When you are done with them (or want a clean slate for that target), wipe with `--clear`:

```bash
terminal-widget --target widget1 --clear
```

That resets the target. If you only want the footer gone and everything else kept, `"buttons": []` or `--clear-buttons` will do the lighter trim.

Linked text for inline hops, table cells that open docs or tickets, and a button bar that survives your update loop — small pieces, but they make a widget feel like a control surface instead of a screenshot.

If you haven't checked out [TerminalWidget] yet, I think you'll dig it.

## TerminalWidget

Project: [TerminalWidget](https://brettterpstra.com/projects/terminalwidget.md)

- [Grab the Mac Power User bundle for 36% off](https://brettterpstra.com/2026/10/05/grab-the-mac-power-user-bundle-for-20-percent-off.md): 2026-10-05
- [Lock screen TerminalWidgets](https://brettterpstra.com/2026/09/05/lock-screen-terminalwidgets.md): 2026-09-05
- [New recipes and diagnostics for TerminalWidget](https://brettterpstra.com/2026/08/28/new-recipes-and-diagnostics-for-terminalwidget.md): 2026-08-28
- [TerminalWidget for Stargazers](https://brettterpstra.com/2026/08/17/terminalwidget-for-stargazers.md): 2026-08-17
- [Creating TerminalWidgets with AI](https://brettterpstra.com/2026/08/11/creating-terminalwidgets-with-ai.md): 2026-08-11
- [My TerminalWidget Dashboard](https://brettterpstra.com/2026/08/10/my-terminalwidget-dashboard.md): 2026-08-10
- [Linked text and buttons in TerminalWidget](https://brettterpstra.com/2026/08/08/linked-text-and-buttons-in-terminalwidget.md): 2026-08-08
- [Introducing TerminalWidget](https://brettterpstra.com/2026/08/01/introducing-terminalwidget.md): 2026-08-01
- [A little more flexibility for your GitHub contribution graphs](https://brettterpstra.com/2026/05/11/a-little-more-flexibility-for-your-github-contribution-graphs.md): 2026-05-11
- [Generate static images of your GitHub contribution chart](https://brettterpstra.com/2026/05/08/generate-static-images-of-your-github-contribution-chart.md): 2026-05-08
- [TerminalWidget: terminal feedback on the Desktop](https://brettterpstra.com/2026/04/20/terminalwidget-terminal-feedback-on-the-desktop.md): 2026-04-20

---

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff. This content is supported by readers like you. [More about Brett](https://brettterpstra.com/contact.md), including social links.

Copyright © 2026 Brett Terpstra. All rights reserved.
