Native visuals
Use a native visual when showing data helps the user more than describing it: a few key numbers, a before-and-after comparison, a small table, or a bar chart. VS Code renders the visual itself, so it matches the user's theme and reads as part of the answer. Keep the explanation in ordinary Markdown around it, and honor the format the user asked for; most answers need no visual.
This is on-demand authoring guidance bundled with the Agents window. It is available while native visuals and AI features are enabled. Rendering does not depend on invoking this skill.
Write a visual
Put the components in a closed Markdown code fence with the language vscode-ui. The visual appears once the closing fence arrives. Start the fence at the beginning of a line, not inside a list item or a block quote.
The incremental build is considerably faster.
```vscode-ui
<Columns>
<Metric label="Full build" value="12.4 s" />
<Metric label="Incremental build" value="1.8 s" delta="-85%" tone="positive" />
</Columns>
<BarChart title="Build duration" unit="s">
<Bar label="Full build" value="12.4" />
<Bar label="Incremental build" value="1.8" />
</BarChart>
<Disclosure summary="How this was measured">
<Text>Median of five runs on a warm cache.</Text>
</Disclosure>
```
Most of the improvement comes from caching.
The chat.nativeComponents.enabled setting controls rendering in the Agents window and is off by default. While it is off, the block is shown as source code. Do not change the user's setting unless asked.
Components
You supply content, data, and composition. VS Code owns how every component looks, so there is nothing to style.
| Component |
Attributes |
Content |
Stack |
none |
Components, laid out top to bottom. |
Columns |
none |
Components, laid out side by side in equal columns that stack when the chat is narrow. |
Text |
variant: body (default), heading, or caption |
Plain text. |
Metric |
label and value (required), delta, tone |
None. |
Badge |
tone |
Plain text. Adjacent badges share a line. |
Table |
caption |
Every Column, then every Row. |
Column |
align: start (default) or end |
The column's header text. Use end for numbers. |
Row |
none |
One Cell per column. |
Cell |
none |
Plain text. |
BarChart |
title (required), unit |
One Bar per value. |
Bar |
label and value (required) |
None. |
Disclosure |
summary (required) |
Components, hidden until the user expands them. |
A tone is neutral (default), positive, negative, or warning. It states what a value means; VS Code chooses the icon and color. Use a tone only where the meaning matters, not for decoration.
Rules
The block is checked strictly. If anything in it is not valid, the user sees the source and the reason instead of the visual.
- Use only the components and attributes above. Names are case-sensitive.
- Write every attribute value as a quoted literal, such as
value="12.4". Expressions in braces, imports, scripts, HTML tags, comments, classes, styles, and colors are not supported.
- Put text only inside
Text, Badge, Column, and Cell. It is plain text: Markdown and nested tags are not interpreted.
- Write
<, >, &, ", {, and } for a literal <, >, &, ", {, and }.
- A
Bar value is a number that is not negative, written with digits only, such as 12.4. Put the unit in the chart's unit attribute, not in the value.
- A
Metric value is text, so it can carry its unit, such as 1.8 s.
- Limits: 32,000 characters, 2,000 components, 8 levels of nesting, 12 columns and 100 rows per table, and 24 bars per chart. Summarize or split larger data.
- Links, images, and code do not belong in a visual. Put them in Markdown outside the block.
For a diagram, a mockup, or a layout that these components cannot express, use Markdown, or an HTML preview when that is available.
1---2name: vscode-ui3description: Present metrics, comparisons, tables, bar charts, and expandable details as native visuals inside an Agents window response. Use when numbers or a comparison are clearer shown than described. Not for diagrams, mockups, or standalone documents.4metadata:5 source: https://skillmd.com/skills/microsoft/vscode-ui6---78<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. -->910# Native visuals1112Use a native visual when showing data helps the user more than describing it: a few key numbers, a before-and-after comparison, a small table, or a bar chart. VS Code renders the visual itself, so it matches the user's theme and reads as part of the answer. Keep the explanation in ordinary Markdown around it, and honor the format the user asked for; most answers need no visual.1314This is on-demand authoring guidance bundled with the Agents window. It is available while native visuals and AI features are enabled. Rendering does not depend on invoking this skill.1516## Write a visual1718Put the components in a closed Markdown code fence with the language `vscode-ui`. The visual appears once the closing fence arrives. Start the fence at the beginning of a line, not inside a list item or a block quote.1920````markdown21The incremental build is considerably faster.2223```vscode-ui24<Columns>25 <Metric label="Full build" value="12.4 s" />26 <Metric label="Incremental build" value="1.8 s" delta="-85%" tone="positive" />27</Columns>28<BarChart title="Build duration" unit="s">29 <Bar label="Full build" value="12.4" />30 <Bar label="Incremental build" value="1.8" />31</BarChart>32<Disclosure summary="How this was measured">33 <Text>Median of five runs on a warm cache.</Text>34</Disclosure>35```3637Most of the improvement comes from caching.38````3940The `chat.nativeComponents.enabled` setting controls rendering in the Agents window and is off by default. While it is off, the block is shown as source code. Do not change the user's setting unless asked.4142## Components4344You supply content, data, and composition. VS Code owns how every component looks, so there is nothing to style.4546| Component | Attributes | Content |47| --- | --- | --- |48| `Stack` | none | Components, laid out top to bottom. |49| `Columns` | none | Components, laid out side by side in equal columns that stack when the chat is narrow. |50| `Text` | `variant`: `body` (default), `heading`, or `caption` | Plain text. |51| `Metric` | `label` and `value` (required), `delta`, `tone` | None. |52| `Badge` | `tone` | Plain text. Adjacent badges share a line. |53| `Table` | `caption` | Every `Column`, then every `Row`. |54| `Column` | `align`: `start` (default) or `end` | The column's header text. Use `end` for numbers. |55| `Row` | none | One `Cell` per column. |56| `Cell` | none | Plain text. |57| `BarChart` | `title` (required), `unit` | One `Bar` per value. |58| `Bar` | `label` and `value` (required) | None. |59| `Disclosure` | `summary` (required) | Components, hidden until the user expands them. |6061A `tone` is `neutral` (default), `positive`, `negative`, or `warning`. It states what a value means; VS Code chooses the icon and color. Use a tone only where the meaning matters, not for decoration.6263## Rules6465The block is checked strictly. If anything in it is not valid, the user sees the source and the reason instead of the visual.6667- Use only the components and attributes above. Names are case-sensitive.68- Write every attribute value as a quoted literal, such as `value="12.4"`. Expressions in braces, imports, scripts, HTML tags, comments, classes, styles, and colors are not supported.69- Put text only inside `Text`, `Badge`, `Column`, and `Cell`. It is plain text: Markdown and nested tags are not interpreted.70- Write `<`, `>`, `&`, `"`, `{`, and `}` for a literal `<`, `>`, `&`, `"`, `{`, and `}`.71- A `Bar` value is a number that is not negative, written with digits only, such as `12.4`. Put the unit in the chart's `unit` attribute, not in the value.72- A `Metric` value is text, so it can carry its unit, such as `1.8 s`.73- Limits: 32,000 characters, 2,000 components, 8 levels of nesting, 12 columns and 100 rows per table, and 24 bars per chart. Summarize or split larger data.74- Links, images, and code do not belong in a visual. Put them in Markdown outside the block.7576For a diagram, a mockup, or a layout that these components cannot express, use Markdown, or an HTML preview when that is available.