SemText

Reference · NPL

<npl-example>

NPL element

PromptLingo reference ↗

It exists to demonstrate the pattern, not to be used in real documents. Real elements replace it.

A sample element that shows how npl-* elements are built. It exists to demonstrate the pattern, not to be used in real documents. Real elements replace it. Displayed by `.npl-example-label` and mirrored to `data-label` (dual-form contract: `data-label` wins when both spellings are present, so the mirror writes the resolved value and never clobbers an authored `data-label`; deferred past parse via afterParse so a sem-source snapshot never sees runtime writes). per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2)

Example

npl-example.html
source
1 <npl-example label="hello">authored children survive beside the label</npl-example>
render

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

variant: default label

With no label authored, the resolved label is the tag name — the default renders the same generated label element first, then the authored children untouched.

variant: default label
npl-example-default-label.html
source
1 <npl-example>authored children ride with the default label</npl-example>
render

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

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