SemText

Reference · NPL

<npl-hormones>

NPL element

PromptLingo reference ↗

Each drive has a level from 0 to 100, drawn as a bar with an arrow showing whether it rose or fell. Notes explain what a bar means when it passes a set limit.

Shows seven drive levels — like momentum, tension, and curiosity — as bars. Each drive has a level from 0 to 100, drawn as a bar with an arrow showing whether it rose or fell. Notes explain what a bar means when it passes a set limit. `panel` renders one row per `h` plus the `state` and `triggered` lines; `bars` renders only the rows (the compact form); `alert` renders only the `alert` elements. Any other value falls back to `panel`. child element — compound state description, rendered in the `panel` variant as the state line. child element — threshold behaviors activated, or `none`. A row is highlighted (`data-fired`) when this block names the hormone: by symbol (word match, so `RST` does not hit "first"), by name, or by its `trigger` text; `none` highlights nothing. child elements — `hormone`, `value`, `threshold`, `behavior` attributes, body text as content. Rendered only by the `alert` variant. 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

  • <h>`<h>` (one per hormone, inside `panel`): `name` (`string`), `symbol` (`string`), `value` (`number`, range [-10, 10] — out-of-range values are clamped into range and the row is marked `data-clamped`, the raw text mirrored to `data-value`), `delta` (`number`; the sign drives the arrow: positive up `↑`, negative down `↓`, zero or absent flat `→`), `trigger` (`string`).

Example

npl-hormones.html
source
1 <npl-hormones variant="panel">
2 <panel>
3 <h name="Momentum" symbol="MTM" value="6" delta="+2" trigger="Tests passed first try"></h>
4 <h name="Tension" symbol="TNS" value="3" delta="0" trigger="Complexity"></h>
5 <h name="Restlessness" symbol="RST" value="8.5" delta="-1" trigger="Strategy failed"></h>
6 </panel>
7 <state>Productive tension</state>
8 <triggered>RST threshold crossed</triggered>
9 <alert hormone="RST" value="8.5" threshold="7" behavior="strategy-switch">
10 Restlessness threshold crossed. Initiating plan-of-action.
11 </alert>
12 </npl-hormones>
render

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

variant: variant="bars"

The compact form — rows only, no state or triggered lines. Renderable: the element upgrades from the npl runtime, not the semtext bundle.

variant: variant="bars"
npl-hormones-bars.html
source
1 <npl-hormones variant="bars">
2 <panel>
3 <h name="Momentum" symbol="MTM" value="6" delta="+2" trigger="Tests passed first try"></h>
4 <h name="Tension" symbol="TNS" value="3" delta="0" trigger="Complexity"></h>
5 <h name="Restlessness" symbol="RST" value="8.5" delta="-1" trigger="Strategy failed"></h>
6 </panel>
7 </npl-hormones>
render

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

variant: variant="alert"

Alerts only — each authored alert renders as a threshold card; rows, state and triggered lines are omitted.

variant: variant="alert"
npl-hormones-alert.html
source
1 <npl-hormones variant="alert">
2 <alert hormone="RST" value="8.5" threshold="7" behavior="strategy-switch">
3 Restlessness threshold crossed. Initiating plan-of-action.
4 </alert>
5 <alert hormone="FTG" value="9" threshold="8" behavior="session-handoff">
6 Fatigue threshold crossed. Handing the session off before quality drifts.
7 </alert>
8 </npl-hormones>
render

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

variant: out-of-range values

Values outside [-10, 10] clamp for display and the row is marked data-clamped (dotted underline on the readout); the authored text is mirrored verbatim to data-value. triggered="none" highlights no row.

variant: out-of-range values
npl-hormones-clamped.html
source
1 <npl-hormones>
2 <panel>
3 <h name="Fatigue" symbol="FTG" value="12" delta="+1" trigger="Session long"></h>
4 <h name="Tension" symbol="TNS" value="-15" delta="0" trigger="Complexity"></h>
5 </panel>
6 <state>Long session winding down</state>
7 <triggered>none</triggered>
8 </npl-hormones>
render

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

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