PyWry Component Reference - MANDATORY SYNTAX

SkillMedia

These are the ONLY events that work for updating widgets. Use sendevent tool with these event types:

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the PyWry Component Reference - MANDATORY SYNTAX skill

About this capability

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.

What this skill tells your AI

The instructions your AI receives, as published by deeleeramone/pywry in pywry/pywry/mcp/skills/component_reference/SKILL.md and read by ahel’s review.

STOP. THIS IS THE AUTHORITATIVE REFERENCE FOR ALL COMPONENTS. YOU MUST USE THE EXACT EVENT SIGNATURES DOCUMENTED HERE. THERE ARE NO EXCEPTIONS. NO WORKAROUNDS. NO DEVIATIONS.


CRITICAL: System Events for Widget Updates

These are the ONLY events that work for updating widgets. Use send_event tool with these event types:

AG Grid Data Updates

Event TypePayloadDescription
grid:update-data{"data": [...rows...], "strategy": "set"}Replace all rows
grid:update-data{"data": [...rows...], "strategy": "append"}Append rows
grid:update-data{"data": [...rows...], "strategy": "update"}Update existing rows
grid:update-columns{"columnDefs": [...]}Update column definitions
grid:update-cell{"rowId": "row-1", "colId": "price", "value": 99.50}Update single cell

AG Grid State Persistence

Event TypePayloadDescription
grid:request-state{}Request current grid state
grid:request-state{"gridId": "my-grid"}Request specific grid's state
grid:restore-state{"state": {...savedState...}}Restore saved grid state
grid:reset-state{"hard": false}Soft reset (keeps column order)
grid:reset-state{"hard": true}Hard reset (full reset)

Response Event: grid:state-response with {"gridId": "...", "state": {...}}

State Object Contents:

  • Column state (width, order, visibility, pinned, sort)
  • Filter state (active filters per column)
  • Sort state (sorted columns and direction)

Plotly Chart Updates

Event TypePayloadDescription
plotly:update-figure{"data": [...], "layout": {...}}Full figure update
plotly:update-layout{"layout": {...}}Layout only update
plotly:reset-zoom{}Reset chart zoom to original

Plotly State Persistence

Event TypePayloadDescription
plotly:request-state{}Request current chart state
plotly:request-state{"chartId": "my-chart"}Request specific chart's state

Response Event: plotly:state-response with {"chartId": "...", "data": [...], "layout": {...}}

Plotly Data Export

Event TypePayloadDescription
plotly:export-data{}Export chart data
plotly:export-data{"chartId": "my-chart"}Export specific chart's data

Response Event: plotly:export-response with {"data": [{"traceIndex": 0, "name": "...", "x": [...], "y": [...], "type": "..."}]}

DOM Content Updates

Event TypePayloadDescription
pywry:set-content{"id": "elementId", "text": "..."}Set text content
pywry:set-content{"id": "elementId", "html": "..."}Set HTML content
pywry:set-style{"id": "elementId", "styles": {"color": "red"}}Update CSS styles

Theme Updates

Event TypePayloadDescription
pywry:update-theme{"theme": "dark"}Switch theme (dark/light/system)
pywry:update-theme{"theme": "ag-theme-alpine-dark"}AG Grid theme
pywry:update-theme{"theme": "plotly_dark"}Plotly template

Toast Notifications

Use show_toast tool instead, or:

Event TypePayloadDescription
pywry:alert{"message": "...", "type": "info"}info, success, warning, error

Toolbar Component State (Get/Set Values)

Event TypePayloadDescription
toolbar:set-value{"componentId": "my-select", "value": "option2"}Set single component value
toolbar:set-values{"values": {"select-1": "A", "toggle-1": true}}Set multiple values at once
toolbar:request-state{"componentId": "my-input"}Request single component value
toolbar:request-state{"toolbarId": "top-toolbar"}Request all values in toolbar
toolbar:request-state{}Request all toolbar values

Response Event: toolbar:state-response with {"componentId": "...", "value": ...} or {"values": {...}}

Supported Components for set-value:

  • select: {"componentId": "id", "value": "option-value"}
  • multiselect: {"componentId": "id", "value": ["a", "b"]}
  • toggle: {"componentId": "id", "value": true}
  • checkbox: {"componentId": "id", "value": true}
  • text/textarea/search: {"componentId": "id", "value": "text"}
  • number: {"componentId": "id", "value": 42}
  • slider: {"componentId": "id", "value": 50}
  • range: {"componentId": "id", "value": {"start": 10, "end": 90}}
  • tabs/radio: {"componentId": "id", "value": "tab-value"}

Note: secret inputs cannot be set via toolbar:set-value for security.


Table of Contents

  1. Button
  2. Select
  3. MultiSelect
  4. Toggle
  5. Checkbox
  6. RadioGroup
  7. TabGroup
  8. TextInput
  9. TextArea
  10. SearchInput
  11. NumberInput
  12. DateInput
  13. SliderInput
  14. RangeInput
  15. SecretInput
  16. Div
  17. Marquee
  18. TickerItem

Button

A clickable button that emits an event.

Properties

PropertyTypeRequiredDefaultDescription
type"button"✅ YES-Component type identifier
labelstring✅ YES-Button text
eventstring✅ YES-Event name (format: namespace:action)
variantstring"primary"Style: primary, secondary, neutral, ghost, outline, danger, warning, icon
sizestringnullSize: xs, sm, lg, xl
dataobject{}Extra data payload sent with event
disabledbooleanfalseDisable the button
descriptionstring""Tooltip on hover

Event Emitted

{
  componentId: "button-abc123",   // Auto-generated component ID
  ...data                         // Your custom data object spread in
}

Auto-Wired Actions

When event follows elementId:action pattern, these actions work automatically:

Event PatternBehavior
myId:incrementFinds id="myId", parses as number, adds 1
myId:decrementFinds id="myId", parses as number, subtracts 1
myId:resetFinds id="myId", sets to 0
myId:toggleFinds id="myId", toggles true/false

Example

{
  "type": "button",
  "label": "Submit",
  "event": "form:submit",
  "variant": "primary",
  "data": {"formId": "contact"}
}

Select

A single-select dropdown.

Properties

PropertyTypeRequiredDefaultDescription
type"select"✅ YES-Component type identifier
eventstring✅ YES-Event name (format: namespace:action)
optionsarray✅ YES-Array of {label, value} objects
selectedstring""Initially selected value
labelstring""Label text
searchablebooleanfalseEnable search filtering
disabledbooleanfalseDisable the dropdown

Event Emitted

{
  value: "selected_value",        // The selected option's value
  componentId: "select-abc123"
}

Example

{
  "type": "select",
  "label": "Theme:",
  "event": "theme:change",
  "options": [
    {"label": "Dark", "value": "dark"},
    {"label": "Light", "value": "light"},
    {"label": "System", "value": "system"}
  ],
  "selected": "dark"
}

MultiSelect

A multi-select dropdown with checkboxes.

Properties

PropertyTypeRequiredDefaultDescription
type"multiselect"✅ YES-Component type identifier
eventstring✅ YES-Event name
optionsarray✅ YES-Array of {label, value} objects
selectedarray[]Initially selected values
labelstring""Label text
disabledbooleanfalseDisable the dropdown

Event Emitted

{
  values: ["value1", "value2"],   // Array of selected values
  componentId: "multiselect-abc123"
}

Example

{
  "type": "multiselect",
  "label": "Columns:",
  "event": "columns:filter",
  "options": [
    {"label": "Name", "value": "name"},
    {"label": "Age", "value": "age"},
    {"label": "City", "value": "city"}
  ],
  "selected": ["name", "age"]
}

Toggle

A toggle switch for boolean values.

Properties

PropertyTypeRequiredDefaultDescription
type"toggle"✅ YES-Component type identifier
eventstring✅ YES-Event name
valuebooleanfalseInitial state
labelstring""Label text
disabledbooleanfalseDisable the toggle

Event Emitted

{
  value: true,                    // Boolean: true or false
  componentId: "toggle-abc123"
}

Example

{
  "type": "toggle",
  "label": "Dark Mode:",
  "event": "theme:toggle",
  "value": true
}

Checkbox

A single checkbox for boolean values.

Properties

PropertyTypeRequiredDefaultDescription
type"checkbox"✅ YES-Component type identifier
eventstring✅ YES-Event name
valuebooleanfalseInitial checked state
labelstring✅ YES-Label text (displayed next to checkbox)
disabledbooleanfalseDisable the checkbox

Event Emitted

{
  value: true,                    // Boolean: true or false
  componentId: "checkbox-abc123"
}

Example

{
  "type": "checkbox",
  "label": "Enable notifications",
  "event": "settings:notify",
  "value": true
}

RadioGroup

A group of radio buttons for single selection.

Properties

PropertyTypeRequiredDefaultDescription
type"radio"✅ YES-Component type identifier
eventstring✅ YES-Event name
optionsarray✅ YES-Array of {label, value} objects
selectedstring""Initially selected value
labelstring""Group label
directionstring"horizontal"Layout: horizontal or vertical
disabledbooleanfalseDisable all radios

Event Emitted

{
  value: "selected_value",        // The selected option's value
  componentId: "radio-abc123"
}

Example

{
  "type": "radio",
  "label": "View:",
  "event": "view:change",
  "options": [
    {"label": "List", "value": "list"},
    {"label": "Grid", "value": "grid"},
    {"label": "Card", "value": "card"}
  ],
  "selected": "list",
  "direction": "horizontal"
}

TabGroup

Tab-style buttons for single selection (visually different from RadioGroup).

Properties

PropertyTypeRequiredDefaultDescription
type"tabs"✅ YES-Component type identifier
eventstring✅ YES-Event name
optionsarray✅ YES-Array of {label, value} objects
selectedstring""Initially selected value
labelstring""Group label
sizestring"md"Size: sm, md, lg
disabledbooleanfalseDisable all tabs

Event Emitted

{
  value: "selected_value",        // The selected tab's value
  componentId: "tab-abc123"
}

Example

{
  "type": "tabs",
  "label": "Mode:",
  "event": "mode:switch",
  "options": [
    {"label": "Edit", "value": "edit"},
    {"label": "Preview", "value": "preview"},
    {"label": "Split", "value": "split"}
  ],
  "selected": "edit"
}

TextInput

A single-line text input with debounced events.

Properties

PropertyTypeRequiredDefaultDescription
type"text"✅ YES-Component type identifier
eventstring✅ YES-Event name
valuestring""Initial value
placeholderstring""Placeholder text
labelstring""Label text
debounceinteger300Debounce milliseconds
disabledbooleanfalseDisable the input

Event Emitted

{
  value: "user typed text",       // The current input value
  componentId: "text-abc123"
}

Example

{
  "type": "text",
  "label": "Name:",
  "event": "form:name",
  "placeholder": "Enter your name",
  "debounce": 300
}

TextArea

A multi-line text area with resizing.

Properties

PropertyTypeRequiredDefaultDescription
type"textarea"✅ YES-Component type identifier
eventstring✅ YES-Event name
valuestring""Initial value
placeholderstring""Placeholder text
labelstring""Label text
rowsinteger3Number of visible rows
colsinteger40Number of visible columns
resizestring"both"Resize: both, horizontal, vertical, none
debounceinteger300Debounce milliseconds
disabledbooleanfalseDisable the textarea

Event Emitted

{
  value: "multi-line\ntext content",  // The textarea content
  componentId: "textarea-abc123"
}

Example

{
  "type": "textarea",
  "label": "Notes:",
  "event": "form:notes",
  "placeholder": "Enter your notes...",
  "rows": 5,
  "resize": "vertical"
}

SearchInput

A search input with magnifying glass icon.

Properties

PropertyTypeRequiredDefaultDescription
type"search"✅ YES-Component type identifier
eventstring✅ YES-Event name
valuestring""Initial value
placeholderstring"Search..."Placeholder text
labelstring""Label text
debounceinteger300Debounce milliseconds
disabledbooleanfalseDisable the input

Event Emitted

{
  value: "search query",          // The search text
  componentId: "search-abc123"
}

Example

{
  "type": "search",
  "label": "Filter:",
  "event": "table:filter",
  "placeholder": "Type to filter...",
  "debounce": 200
}

NumberInput

A numeric input with optional constraints.

Properties

PropertyTypeRequiredDefaultDescription
type"number"✅ YES-Component type identifier
eventstring✅ YES-Event name
valuenumbernullInitial value
minnumbernullMinimum value
maxnumbernullMaximum value
stepnumbernullStep increment
labelstring""Label text
disabledbooleanfalseDisable the input

Event Emitted

{
  value: 42,                      // The numeric value
  componentId: "number-abc123"
}

Example

{
  "type": "number",
  "label": "Quantity:",
  "event": "cart:quantity",
  "value": 1,
  "min": 1,
  "max": 100,
  "step": 1
}

DateInput

A date picker input.

Properties

PropertyTypeRequiredDefaultDescription
type"date"✅ YES-Component type identifier
eventstring✅ YES-Event name
valuestring""Initial date (YYYY-MM-DD)
minstring""Minimum date (YYYY-MM-DD)
maxstring""Maximum date (YYYY-MM-DD)
labelstring""Label text
disabledbooleanfalseDisable the input

Event Emitted

{
  value: "2025-01-29",            // Date string in YYYY-MM-DD format
  componentId: "date-abc123"
}

Example

{
  "type": "date",
  "label": "Start Date:",
  "event": "filter:startDate",
  "value": "2025-01-01",
  "min": "2020-01-01",
  "max": "2030-12-31"
}

SliderInput

A single-value slider.

Properties

PropertyTypeRequiredDefaultDescription
type"slider"✅ YES-Component type identifier
eventstring✅ YES-Event name
valuenumber50Initial value
minnumber0Minimum value
maxnumber100Maximum value
stepnumber1Step increment
show_valuebooleantrueShow value display
debounceinteger50Debounce milliseconds
labelstring""Label text
disabledbooleanfalseDisable the slider

Event Emitted

{
  value: 75,                      // The slider value
  componentId: "slider-abc123"
}

Example

{
  "type": "slider",
  "label": "Volume:",
  "event": "audio:volume",
  "value": 50,
  "min": 0,
  "max": 100,
  "step": 5,
  "show_value": true
}

RangeInput

A dual-handle range slider for min/max selection.

Properties

PropertyTypeRequiredDefaultDescription
type"range"✅ YES-Component type identifier
eventstring✅ YES-Event name
startnumber0Initial start value
endnumber100Initial end value
minnumber0Minimum value
maxnumber100Maximum value
stepnumber1Step increment
show_valuebooleantrueShow value displays
debounceinteger50Debounce milliseconds
labelstring""Label text
disabledbooleanfalseDisable the slider

Event Emitted

{
  start: 25,                      // Start/min value
  end: 75,                        // End/max value
  componentId: "range-abc123"
}

Example

{
  "type": "range",
  "label": "Price Range:",
  "event": "filter:price",
  "start": 100,
  "end": 500,
  "min": 0,
  "max": 1000,
  "step": 10,
  "show_value": true
}

SecretInput

A password/secret input with visibility toggle and copy button.

Properties

PropertyTypeRequiredDefaultDescription
type"secret"✅ YES-Component type identifier
eventstring✅ YES-Event name
valuestring""Initial secret value (stored securely)
placeholderstring""Placeholder text
labelstring""Label text
show_togglebooleantrueShow visibility toggle button
show_copybooleantrueShow copy button
debounceinteger300Debounce milliseconds
disabledbooleanfalseDisable the input

Events Emitted

On value change:

{
  value: "base64_encoded_value",  // Base64 encoded secret
  encoded: true,
  componentId: "secret-abc123"
}

On reveal request: (event: {event}:reveal)

{
  componentId: "secret-abc123"
}

On copy request: (event: {event}:copy)

{
  componentId: "secret-abc123"
}

Example

{
  "type": "secret",
  "label": "API Key:",
  "event": "settings:apiKey",
  "placeholder": "Enter your API key",
  "show_toggle": true,
  "show_copy": true
}

Div

A container for custom HTML content.

Properties

PropertyTypeRequiredDefaultDescription
type"div"✅ YES-Component type identifier
contentstring✅ YES-HTML content
component_idstringautoID for updates via set_content
class_namestring""CSS class name
stylestring""Inline CSS styles
childrenarraynullNested toolbar items

Event Emitted

No automatic events. Use for layout/display only, or add interactive children.

Example

{
  "type": "div",
  "content": "<span style=\"color: green\">Online</span>",
  "component_id": "status-display",
  "style": "padding: 8px; font-weight: bold"
}

Marquee

A scrolling text ticker component.

Properties

PropertyTypeRequiredDefaultDescription
type"marquee"✅ YES-Component type identifier
textstring✅ YES-Scrolling text content
eventstring-Event name (if clickable)
speednumber15Seconds per scroll cycle (1-300)
directionstring"left"Direction: left, right, up, down
behaviorstring"scroll"Behavior: scroll, alternate, slide, static
pause_on_hoverbooleantruePause on mouse hover
gapinteger50Gap between content (pixels)
clickablebooleanfalseEmit event on click
separatorstring""Separator between repeats
component_idstringautoID for updates

Event Emitted (when clickable)

{
  value: "the marquee text",      // The text content
  componentId: "marquee-abc123"
}

Update Events

Use set_content or update_marquee tools to update:

// Update text
{id: "marquee-abc123", text: "New content!"}

// Update speed
{id: "marquee-abc123", speed: 10}

// Pause/resume
{id: "marquee-abc123", paused: true}

Example

{
  "type": "marquee",
  "text": "Breaking News: Market is up 5% • Weather: Sunny • More updates...",
  "speed": 20,
  "direction": "left",
  "pause_on_hover": true,
  "clickable": true,
  "event": "news:click"
}

TickerItem

A helper for creating updatable items within a Marquee.

Note: TickerItem is used with build_ticker_item tool, not as a direct toolbar item.

Properties

PropertyTypeRequiredDefaultDescription
tickerstring✅ YES-Unique identifier (e.g., "AAPL")
textstring""Text content
htmlstring""HTML content (overrides text)
class_namestring""CSS classes
stylestring""Inline styles

Update via update_ticker_item

{
  ticker: "AAPL",
  text: "AAPL $186.25 ▲",
  styles: {color: "#22c55e"},
  class_add: "stock-up",
  class_remove: "stock-down"
}

Example

Shortened here. Read the whole file on GitHub.

Signals

GitHub stars
93
Forks
6
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
component-reference
Source
github.com/deeleeramone/pywry