SemText

Reference · NPL

<npl-artifact>

NPL element

PromptLingo reference ↗

Wrap the artifact's title and content in this element and the page adds a frame around them. The content itself is never changed.

Shows a piece of work an agent produced, like code or a report, with a title and notes. Wrap the artifact's title and content in this element and the page adds a frame around them. The content itself is never changed. (unset). A content type such as `text`, `code`, `svg`, `markdown`. `svg` routes the content through a sandboxed iframe; every other value (including unset) renders the content preformatted. Mirrored to `data-type` (dual-form contract; the mirror is deferred past parse via afterParse). per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2)

Children

  • <title>
  • <content>

Example

npl-artifact.html
source
1 <npl-artifact type="code">
2 <title>Q3 revenue breakdown</title>
3 <content>def q3(): return rows("2026-Q3")</content>
4 </npl-artifact>
5
6 <npl-artifact type="svg">
7 <title>Quarterly trend</title>
8 <content><svg width="320" height="120"><rect x="0" y="70" width="40" height="50"/><rect x="60" y="40" width="40" height="80"/><rect x="120" y="15" width="40" height="105"/></svg></content>
9 </npl-artifact>
10
11 <npl-artifact class="npl-artifact" data-type="text">
12 <span class="npl-title">Release note</span>
13 <span class="npl-content">v2.4 ships the viewer M2 lazy opt-in.</span>
14 </npl-artifact>
render

Live render boots with JavaScript — the authored source is alongside.

Source: spec/schema/npl/npl-artifact.md