nustack
ReferenceNu STDui

refs.output

Display / output Refs -- server-owned sinks that render into the body.

Module nustd.ui.refs.output.

Display / output Refs -- server-owned sinks that render into the body.

Server pushes values via write / append; the browser only renders, never reads back.

NameSortCallMeaning
AlertRefrefAlertRef(address, parent_ref=None, owner_shape=None)Display banner ref. write carries partial updates; notify fires on user dismiss.
BadgeRefrefBadgeRef(address, parent_ref=None, owner_shape=None)Display-only badge ref. One write op carries every mutation.
CodeBlockRefrefCodeBlockRef(address, parent_ref=None, owner_shape=None)Display-only code block. One write carries a partial dict {code, language, show_copy}.
DividerRefrefDividerRef(address, parent_ref=None, owner_shape=None)Display-only divider ref. One write op carries every mutation.
GaugeRefrefGaugeRef(address, parent_ref=None, owner_shape=None)Display-only gauge ref. One write op carries every mutation.
HeadingRefrefHeadingRef(address, parent_ref=None, owner_shape=None)Display-only heading ref. One write op carries every mutation.
ImageRefrefImageRef(address, parent_ref=None, owner_shape=None)Display-only image ref. One write op carries every mutation.
JsonViewerRefrefJsonViewerRef(address, parent_ref=None, owner_shape=None)Display-only json viewer ref. One write op carries every mutation via partial-merge.
LinkRefrefLinkRef(address, parent_ref=None, owner_shape=None)Display-only link ref. One write op carries every mutation.
MarkdownRefrefMarkdownRef(address, parent_ref=None, owner_shape=None)Display-only markdown ref. Source string rendered as commonmark.
ProgressRefrefProgressRef(address, parent_ref=None, owner_shape=None)Display-only progress ref. One write op carries every mutation.
StatRefrefStatRef(address, parent_ref=None, owner_shape=None)Display-only stat ref. Server-owned, single write op carries partial updates.
TableRefrefTableRef(address, parent_ref=None, owner_shape=None)Tabular data; display by default, optional sortable headers and row click.
TextRefrefTextRef(address, parent_ref=None, owner_shape=None)Display-only string ref. Body copy.

AlertRef

Display banner ref. write carries partial updates; notify fires on user dismiss.

AlertRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.AlertRef. Kind Ref, sort ref, cardinality scalar.

Variant maps to the Alert primitive's tone (5 tones per kit): neutral picks the plain elevated surface, the rest attach the matching status wash / line / fg + auto icon. The renderer falls back to neutral for unmapped values.

Methods

.set_variant(name)

Builds Nu.

Arguments

NameTypeDefaultMeaning
nameVariant | StrArg

Undocumented: summary, example.

.set_title(text)

Builds Nu.

Arguments

NameTypeDefaultMeaning
textStrArg

Undocumented: summary, example.

.set_body(text)

Builds Nu.

Arguments

NameTypeDefaultMeaning
textStrArg

Undocumented: summary, example.

.set_dismissible(flag)

Builds Nu.

Arguments

NameTypeDefaultMeaning
flagBoolArg

Undocumented: summary, example.

.set(title, body=<UNSET>, variant=<UNSET>, dismissible=<UNSET>)

Builds Nu.

Arguments

NameTypeDefaultMeaning
titleStrArg
bodyStrArg<UNSET>
variantVariant | StrArg<UNSET>
dismissibleBoolArg<UNSET>

Undocumented: summary, example.

.on_dismiss()

Builds Changed.

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

BadgeRef

Display-only badge ref. One write op carries every mutation.

BadgeRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.BadgeRef. Kind Ref, sort ref, cardinality scalar.

Variant maps to the Badge primitive's status tones; neutral becomes the kit outline (transparent bg, muted border).

Methods

.set_label(text)

Builds Nu.

Arguments

NameTypeDefaultMeaning
textStrArg

Undocumented: summary, example.

.set_variant(name)

Builds Nu.

Arguments

NameTypeDefaultMeaning
nameVariant | StrArg

Undocumented: summary, example.

.set(label, variant=<UNSET>)

Builds Nu.

Arguments

NameTypeDefaultMeaning
labelStrArg
variantVariant | StrArg<UNSET>

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

CodeBlockRef

Display-only code block. One write carries a partial dict {code, language, show_copy}.

CodeBlockRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.CodeBlockRef. Kind Ref, sort ref, cardinality scalar.

Methods

.set(code=<UNSET>, language=<UNSET>)

Builds Nu.

Arguments

NameTypeDefaultMeaning
codeStrArg<UNSET>
languageStrArg<UNSET>

Undocumented: summary, example.

.set_code(code)

Builds Nu.

Arguments

NameTypeDefaultMeaning
codeStrArg

Undocumented: summary, example.

.set_language(language)

Builds Nu.

Arguments

NameTypeDefaultMeaning
languageStrArg

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

DividerRef

Display-only divider ref. One write op carries every mutation.

DividerRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.DividerRef. Kind Ref, sort ref, cardinality scalar.

Methods

.set_label(text)

Builds Nu.

Arguments

NameTypeDefaultMeaning
textStrArg

Undocumented: summary, example.

.set_align(side)

Builds Nu.

Arguments

NameTypeDefaultMeaning
sideAlign | StrArg

Undocumented: summary, example.

.set(label, align=<UNSET>)

Builds Nu.

Arguments

NameTypeDefaultMeaning
labelStrArg
alignAlign | StrArg<UNSET>

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

GaugeRef

Display-only gauge ref. One write op carries every mutation.

GaugeRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.GaugeRef. Kind Ref, sort ref, cardinality scalar.

Variant is the tone the arc reads with. neutral maps to the kit Gauge accent tone (brand purple); the other three map 1:1 to status tokens.

Methods

.set_value(value)

Builds Nu.

Arguments

NameTypeDefaultMeaning
valueFloatArg

Undocumented: summary, example.

.set_caption(text)

Builds Nu.

Arguments

NameTypeDefaultMeaning
textStrArg

Undocumented: summary, example.

.set_variant(variant)

Builds Nu.

Arguments

NameTypeDefaultMeaning
variantGaugeVariant | StrArg

Undocumented: summary, example.

.set(value, caption=<UNSET>, variant=<UNSET>)

Builds Nu.

Arguments

NameTypeDefaultMeaning
valueFloatArg
captionStrArg<UNSET>
variantGaugeVariant | StrArg<UNSET>

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

HeadingRef

Display-only heading ref. One write op carries every mutation.

HeadingRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.HeadingRef. Kind Ref, sort ref, cardinality scalar.

Methods

.set_label(text)

Builds Nu.

Arguments

NameTypeDefaultMeaning
textStrArg

Undocumented: summary, example.

.set_level(n)

Builds Nu.

Arguments

NameTypeDefaultMeaning
nIntArg

Undocumented: summary, example.

.set_align(side)

Builds Nu.

Arguments

NameTypeDefaultMeaning
sideAlign | StrArg

Undocumented: summary, example.

.set(label, level=<UNSET>, align=<UNSET>)

Builds Nu.

Arguments

NameTypeDefaultMeaning
labelStrArg
levelIntArg<UNSET>
alignAlign | StrArg<UNSET>

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

ImageRef

Display-only image ref. One write op carries every mutation.

ImageRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.ImageRef. Kind Ref, sort ref, cardinality scalar.

Methods

.set_src(url)

Builds Nu.

Arguments

NameTypeDefaultMeaning
urlStrArg

Undocumented: summary, example.

.set_alt(text)

Builds Nu.

Arguments

NameTypeDefaultMeaning
textStrArg

Undocumented: summary, example.

.set_fit(mode)

Builds Nu.

Arguments

NameTypeDefaultMeaning
modeFit | StrArg

Undocumented: summary, example.

.set_size(width, height)

Builds Nu.

Arguments

NameTypeDefaultMeaning
widthIntArg | None
heightIntArg | None

Undocumented: summary, example.

.set_rounded(flag)

Builds Nu.

Arguments

NameTypeDefaultMeaning
flagBoolArg

Undocumented: summary, example.

.set(src, alt=<UNSET>, fit=<UNSET>, width=<UNSET>, height=<UNSET>, rounded=<UNSET>)

Builds Nu.

Arguments

NameTypeDefaultMeaning
srcStrArg
altStrArg<UNSET>
fitFit | StrArg<UNSET>
widthIntArg<UNSET>
heightIntArg<UNSET>
roundedBoolArg<UNSET>

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

JsonViewerRef

Display-only json viewer ref. One write op carries every mutation via partial-merge.

JsonViewerRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.JsonViewerRef. Kind Ref, sort ref, cardinality scalar.

Methods

.set_value(value)

Builds Nu.

Arguments

NameTypeDefaultMeaning
valueArg[Any]

Undocumented: summary, example.

.set_expand_depth(depth)

Builds Nu.

Arguments

NameTypeDefaultMeaning
depthIntArg

Undocumented: summary, example.

.set_theme(name)

Builds Nu.

Arguments

NameTypeDefaultMeaning
nameTheme | StrArg

Undocumented: summary, example.

.set_copyable(flag)

Builds Nu.

Arguments

NameTypeDefaultMeaning
flagBoolArg

Undocumented: summary, example.

.set_sortable(flag)

Builds Nu.

Arguments

NameTypeDefaultMeaning
flagBoolArg

Undocumented: summary, example.

.set_max_height(px)

Builds Nu.

Arguments

NameTypeDefaultMeaning
pxIntArg | None

Undocumented: summary, example.

.set(value, expand_depth=<UNSET>, theme=<UNSET>, copyable=<UNSET>, sortable=<UNSET>, max_height=<UNSET>)

Builds Nu.

Arguments

NameTypeDefaultMeaning
valueArg[Any]
expand_depthIntArg<UNSET>
themeTheme | StrArg<UNSET>
copyableBoolArg<UNSET>
sortableBoolArg<UNSET>
max_heightIntArg<UNSET>

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

LinkRef

Display-only link ref. One write op carries every mutation.

LinkRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.LinkRef. Kind Ref, sort ref, cardinality scalar.

Methods

.set_href(url)

Builds Nu.

Arguments

NameTypeDefaultMeaning
urlStrArg

Undocumented: summary, example.

.set_label(text)

Builds Nu.

Arguments

NameTypeDefaultMeaning
textStrArg

Undocumented: summary, example.

.set_target(name)

Builds Nu.

Arguments

NameTypeDefaultMeaning
nameTarget | StrArg

Undocumented: summary, example.

.set_external(flag)

Builds Nu.

Arguments

NameTypeDefaultMeaning
flagBoolArg | None

Undocumented: summary, example.

.set(href=<UNSET>, label=<UNSET>, target=<UNSET>, external=<UNSET>)

Builds Nu.

Arguments

NameTypeDefaultMeaning
hrefStrArg<UNSET>
labelStrArg<UNSET>
targetTarget | StrArg<UNSET>
externalBoolArg | None<UNSET>

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

MarkdownRef

Display-only markdown ref. Source string rendered as commonmark.

MarkdownRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.MarkdownRef. Kind Ref, sort ref, cardinality scalar.

Methods

.set(value)

Builds Nu.

Arguments

NameTypeDefaultMeaning
valueStrArg

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

ProgressRef

Display-only progress ref. One write op carries every mutation.

ProgressRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.ProgressRef. Kind Ref, sort ref, cardinality scalar.

Methods

.set_value(value)

Builds Nu.

Arguments

NameTypeDefaultMeaning
valueFloatArg

Undocumented: summary, example.

.set_caption(text)

Builds Nu.

Arguments

NameTypeDefaultMeaning
textStrArg

Undocumented: summary, example.

.set_indeterminate(flag)

Builds Nu.

Arguments

NameTypeDefaultMeaning
flagBoolArg

Undocumented: summary, example.

.set(value, caption=<UNSET>, indeterminate=<UNSET>)

Builds Nu.

Arguments

NameTypeDefaultMeaning
valueFloatArg
captionStrArg<UNSET>
indeterminateBoolArg<UNSET>

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

StatRef

Display-only stat ref. Server-owned, single write op carries partial updates.

StatRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.StatRef. Kind Ref, sort ref, cardinality scalar.

Methods

.set_label(text)

Builds Nu.

Arguments

NameTypeDefaultMeaning
textStrArg

Undocumented: summary, example.

.set_value(text)

Builds Nu.

Arguments

NameTypeDefaultMeaning
textStrArg

Undocumented: summary, example.

.set_delta(text)

Builds Nu.

Arguments

NameTypeDefaultMeaning
textStrArg

Undocumented: summary, example.

.set_trend(name)

Builds Nu.

Arguments

NameTypeDefaultMeaning
nameTrend | StrArg

Undocumented: summary, example.

.set(value, label=<UNSET>, delta=<UNSET>, trend=<UNSET>)

Builds Nu.

Arguments

NameTypeDefaultMeaning
valueStrArg
labelStrArg<UNSET>
deltaStrArg<UNSET>
trendTrend | StrArg<UNSET>

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

TableRef

Tabular data; display by default, optional sortable headers and row click.

TableRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.TableRef. Kind Ref, sort ref, cardinality scalar.

Composes the kit Table primitive family. dense=True maps to the primitive's compact density; striped=True selects the striped variant.

Methods

.set(table)

Builds Nu.

Arguments

NameTypeDefaultMeaning
tableDictArg[str, Any]

Undocumented: summary, example.

.clear()

Builds Nu.

Undocumented: summary, example.

.append(row)

Builds Nu.

Arguments

NameTypeDefaultMeaning
rowListArg[Any]

Undocumented: summary, example.

.set_sort(column, direction)

Builds Nu.

Arguments

NameTypeDefaultMeaning
columnStrArg
directionSortDirection | StrArg

Undocumented: summary, example.

.on_row_click()

Builds Changed.

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

TextRef

Display-only string ref. Body copy.

TextRef(address, parent_ref=None, owner_shape=None)

Path nustd.ui.TextRef. Kind Ref, sort ref, cardinality scalar.

Methods

.set(value)

Builds Nu.

Arguments

NameTypeDefaultMeaning
valueStrArg

Undocumented: summary, example.

Inherited methods

From nustd.ui.core.base.Ref:

CallBuildsMeaning
.erase()NuDrop this Ref's node on the client, and everything under it.

Undocumented: example.

On this page