Skip to content
Development
Skill

/interactive_buttons

**STOP. READ THIS ENTIRE FILE BEFORE CREATING ANY WIDGET.**

From plugin
pywry
9918 skills1 agent2 commands1 MCP

Claude Code

$ npx -y skills add deeleeramone/PyWry --skill interactive_buttons --agent claude-code

SKILL.md

interactive_buttons.SKILL.md

Interactive Buttons - MANDATORY PATTERN

> **STOP. READ THIS ENTIRE FILE BEFORE CREATING ANY WIDGET.**

The ONLY Correct Way to Create Buttons

Copy this EXACTLY. Do not deviate.

{
  "html": "<div id=\"counter\" style=\"font-size:48px;text-align:center;padding:50px\">0</div>",
  "title": "Counter",
  "height": 400,
  "toolbars": [{
    "position": "top",
    "items": [
      {"type": "button", "label": "+1", "event": "counter:increment", "variant": "primary"},
      {"type": "button", "label": "-1", "event": "counter:decrement", "variant": "neutral"},
      {"type": "button", "label": "Reset", "event": "counter:reset", "variant": "danger"}
    ]
  }]
}

**THAT'S IT.** No callbacks needed. Buttons work automatically.

How It Works

The event name `counter:increment` is parsed as:

  • `counter` → the HTML element id to update
  • `increment` → the action to perform

When you click "+1", PyWry: 1. Finds the element with `id="counter"` 2. Parses its current text as a number 3. Adds 1 to it 4. Updates the display

Supported Actions

| Event Pattern | What It Does | |--------------|--------------| | `myId:increment` | Adds 1 to element's text | | `myId:decrement` | Subtracts 1 from element's text | | `myId:reset` | Sets element's text to 0 | | `myId:toggle` | Toggles between true/false |

More Examples

Status Toggle

create_widget(
    html='<div id="status" style="font-size:24px;text-align:center">false</div>',
    toolbars=[{
        "position": "top",
        "items": [
            {"type": "button", "label": "Toggle Status", "event": "status:toggle"}
        ]
    }]
)

Score Tracker

create_widget(
    html='''
        <div style="display:flex;justify-content:space-around;padding:20px">
            <div>Home: <span id="home" style="font-size:48px">0</span></div>
            <div>Away: <span id="away" style="font-size:48px">0</span></div>
        </div>
    ''',
    toolbars=[{
        "position": "top",
        "items": [
            {"type": "button", "label": "Home +1", "event": "home:increment"},
            {"type": "button", "label": "Away +1", "event": "away:increment"},
            {"type": "button", "label": "Reset All", "event": "home:reset"},
        ]
    }]
)

Rules

1. **Element id must exist** - The HTML must have an element with the matching id 2. **Event format is `id:action`** - Colon separates the target from the action 3. **Actions are lowercase** - `increment`, `decrement`, `reset`, `toggle` 4. **Initial value matters** - For increment/decrement, start with a number like "0"

Common Mistakes

❌ Wrong: `event: "increment"` (no target id) ❌ Wrong: `event: "counter-increment"` (hyphen instead of colon) ❌ Wrong: HTML has `id="Counter"` but event is `counter:increment` (case mismatch)

✅ Correct: `event: "counter:increment"` with `id="counter"` in HTML

Read more
@deeleeramone
Ships withpywry

PyWry is a cross-platform app factory, rendering engine and UI toolkit for Python that produces native desktop, web, and notebook experiences from a single API.

9918 skills1 agent1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
99
Star history of deeleeramone/PyWry on GitHub, a chart by star-history.com

Other skills on pywry.

pywry-orientation

pywry-orientation

When to reach for PyWry MCP tools (native webview rendering, Plotly, TradingView, AgGrid, chat) instead of writing…

@deeleeramone@deeleeramoneInstall Skill
chat_agent

chat_agent

How an agent operates inside a PyWry chat widget — reading user messages, attachments, @-context, tool-call result cards,…

@deeleeramone@deeleeramoneInstall Skill
component_reference

component_reference

**STOP. THIS IS THE AUTHORITATIVE REFERENCE FOR ALL COMPONENTS.** **YOU MUST USE THE EXACT EVENT SIGNATURES DOCUMENTED HERE.**…

@deeleeramone@deeleeramoneInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about interactive_buttons.

Which coding agents can use interactive_buttons?
interactive_buttons installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.