Labsco
microsoft logo

add-adaptive-card-form

✓ Official136,050

by microsoft · part of microsoft/powertoys

Create form-based UI for your Command Palette extension using Adaptive Cards. Use when asked to add forms, user input fields, toggle switches, text inputs, dropdown menus, data entry, surveys, configuration dialogs, or interactive content pages. Supports the Adaptive Cards Designer for visual form building.

🧰 Not standalone. This skill ships with microsoft/powertoys and only works together with that tool — install the tool first, then add this skill.

This is the playbook your agent receives when the skill activates — you don't need to read it to use the skill, but it's here to audit before installing.

Add Forms with Adaptive Cards

Create interactive forms in your Command Palette extension using Adaptive Cards. Forms allow you to collect user input through text fields, toggles, dropdowns, and other controls.

When to Use This Skill

  • Adding a form to collect user input (name, settings, feedback)
  • Creating interactive configuration dialogs
  • Building data entry interfaces
  • Adding toggle switches or dropdown menus
  • Displaying complex layouts beyond simple lists

Key Concepts

TemplateJson

The JSON layout of your form (from Adaptive Cards schema). Design it at https://adaptivecards.io/designer/

DataJson (Optional)

Dynamic data binding using ${...} placeholders in your TemplateJson:

TemplateJson = """{ "body": [{ "type": "TextBlock", "text": "${title}" }] }""";
DataJson = """{ "title": "Dynamic Title" }""";

SubmitForm

Called when the user submits. Parse payload as JSON to read input values by their id.

Mixing Content Types

You can combine forms with markdown on the same page:

public override IContent[] GetContent() => [
    new MarkdownContent("# Instructions\nFill out the form below."),
    _form,
];

Common Form Patterns

See form-patterns.md for template JSON for common form types.

Documentation