Documentation
¶
Overview ¶
Package ui is a declarative authoring layer for the Mosaic SDUI — a "reads like a widget tree" ergonomics (Flutter/Compose/Vaadin, the gomponents pattern in Go). A component takes ...El, and children, props and slots are all Els that intermix, so a screen reads as a tree rather than a builder with option bags. The tree compiles to the same protobuf UINode the wire uses (ADR 0044) at Build(); only the authoring changes, not the payload.
This file is the hand-written runtime — the Element machinery and the control-flow/escape-hatch options (Prop, ID, Slot, Group, When). The component constructors and the typed sugar (Hero, PosterCard, OnTap, Meta, …) are generated into components.gen.go from ui.spec.json by tools/genui; edit the spec, not the generated file.
Index ¶
- Constants
- Variables
- type Action
- type El
- func A11yLabel(v string) El
- func Account(els ...El) El
- func ActionLabel(v string) El
- func ActionSlot(els ...El) El
- func Actions(els ...El) El
- func Active(v bool) El
- func Align(v string) El
- func Aside(els ...El) El
- func Avatar(v string) El
- func Backdrop(v string) El
- func BadgeText(v string) El
- func BindA11yLabel(path string) El
- func BindActionLabel(path string) El
- func BindActive(path string) El
- func BindAlign(path string) El
- func BindAvatar(path string) El
- func BindBackdrop(path string) El
- func BindBadgeText(path string) El
- func BindBusy(path string) El
- func BindCapabilities(path string) El
- func BindCredits(path string) El
- func BindDisabled(path string) El
- func BindError(path string) El
- func BindFocusGroup(path string) El
- func BindFocusable(path string) El
- func BindGenres(path string) El
- func BindHasMore(path string) El
- func BindHasNext(path string) El
- func BindHasPrev(path string) El
- func BindHeading(path string) El
- func BindHeadingLevel(path string) El
- func BindHelp(path string) El
- func BindIconName(path string) El
- func BindIndex(path string) El
- func BindInitialFocus(path string) El
- func BindInputType(path string) El
- func BindItemWidth(path string) El
- func BindJustify(path string) El
- func BindKicker(path string) El
- func BindLive(path string) El
- func BindLoadMore(path string) El
- func BindLogo(path string) El
- func BindMessage(path string) El
- func BindMeta(path string) El
- func BindMimeType(path string) El
- func BindMinColumnWidth(path string) El
- func BindName(path string) El
- func BindNativeTitle(path string) El
- func BindNextAction(path string) El
- func BindNextFocus(path string) El
- func BindNodeID(path string) El
- func BindOn(path string) El
- func BindOnAppear(path string) El
- func BindOnDisappear(path string) El
- func BindOnTap(path string) El
- func BindOptions(path string) El
- func BindOrigin(path string) El
- func BindOverlayTitle(path string) El
- func BindOverview(path string) El
- func BindPartID(path string) El
- func BindPlaceholder(path string) El
- func BindPoster(path string) El
- func BindPrevAction(path string) El
- func BindProgress(path string) El
- func BindProgressLabel(path string) El
- func BindRating(path string) El
- func BindRatingLabel(path string) El
- func BindResumeAt(path string) El
- func BindRetry(path string) El
- func BindRole(path string) El
- func BindRows(path string) El
- func BindRuntime(path string) El
- func BindSelected(path string) El
- func BindShowTags(path string) El
- func BindSources(path string) El
- func BindSubmitAction(path string) El
- func BindSubmitLabel(path string) El
- func BindSubtitle(path string) El
- func BindSummary(path string) El
- func BindThumbnail(path string) El
- func BindTitle(path string) El
- func BindValue(path string) El
- func BindVars(path string) El
- func BindWatched(path string) El
- func BindWrap(path string) El
- func BindYear(path string) El
- func Bleed(els ...El) El
- func Busy(v bool) El
- func Capabilities(v []any) El
- func Content(els ...El) El
- func Credits(v ...string) El
- func Disabled(v bool) El
- func Error(v string) El
- func FocusGroup(v bool) El
- func Focusable(v bool) El
- func Footer(els ...El) El
- func Genres(v ...string) El
- func Group(els ...El) El
- func HasMore(v bool) El
- func HasNext(v bool) El
- func HasPrev(v bool) El
- func Header(els ...El) El
- func Heading(v string) El
- func HeadingLevel(v int) El
- func Help(v string) El
- func ID(id string) El
- func IconName(v string) El
- func Index(v int) El
- func InitialFocus(v bool) El
- func InputType(v string) El
- func ItemWidth(v int) El
- func Justify(v string) El
- func Kicker(v string) El
- func Live(v string) El
- func LoadMore(v Action) El
- func Logo(v string) El
- func Message(v string) El
- func Meta(v ...string) El
- func MimeType(v string) El
- func MinColumnWidth(v int) El
- func Name(v string) El
- func NativeTitle(v string) El
- func Nav(els ...El) El
- func NextAction(v Action) El
- func NextFocus(v map[string]any) El
- func NodeID(v string) El
- func On(v bool) El
- func OnAppear(v Action) El
- func OnDisappear(v Action) El
- func OnTap(v Action) El
- func Options(v []any) El
- func Origin(v string) El
- func OverlayTitle(v bool) El
- func Overview(v string) El
- func PartID(v string) El
- func Placeholder(v string) El
- func Poster(v string) El
- func PrevAction(v Action) El
- func Progress(v float64) El
- func ProgressLabel(v string) El
- func Prop(key string, val any) El
- func Rail(els ...El) El
- func Rating(v string) El
- func RatingLabel(v string) El
- func ResumeAt(v float64) El
- func Retry(v Action) El
- func Role(v string) El
- func Rows(v []any) El
- func Runtime(v string) El
- func Selected(v bool) El
- func ShowTags(v bool) El
- func Slot(name string, els ...El) El
- func Sources(v []any) El
- func SubmitAction(v Action) El
- func SubmitLabel(v string) El
- func Subtitle(v string) El
- func Summary(v string) El
- func Tags(els ...El) El
- func Thumbnail(v string) El
- func Title(v string) El
- func TopBar(els ...El) El
- func Value(v string) El
- func Vars(v []any) El
- func Watched(v bool) El
- func When(cond bool, el El) El
- func Wrap(v bool) El
- func Year(v string) El
- type Element
- func AppShell(title string, els ...El) *Element
- func Badge(label string, tone string, els ...El) *Element
- func Banner(message string, tone string, els ...El) *Element
- func Box(els ...El) *Element
- func Button(label string, variant string, els ...El) *Element
- func Carousel(els ...El) *Element
- func Component(typ string, els ...El) *Element
- func DetailHeader(title string, els ...El) *Element
- func DetailHero(title string, els ...El) *Element
- func Divider(els ...El) *Element
- func EmptyState(icon string, title string, els ...El) *Element
- func EpisodeRow(title string, els ...El) *Element
- func ErrorState(category string, els ...El) *Element
- func ExtensionCard(name string, els ...El) *Element
- func Form(els ...El) *Element
- func Fragment(els ...El) *Element
- func GenreTag(label string, els ...El) *Element
- func Grid(els ...El) *Element
- func Hero(title string, els ...El) *Element
- func Icon(els ...El) *Element
- func IconButton(icon string, label string, variant string, els ...El) *Element
- func Image(els ...El) *Element
- func InfoPanel(els ...El) *Element
- func MediaTile(title string, els ...El) *Element
- func Menu(els ...El) *Element
- func NavBar(els ...El) *Element
- func NavItem(els ...El) *Element
- func Outlet(els ...El) *Element
- func Pagination(els ...El) *Element
- func PersonChip(name string, els ...El) *Element
- func PlaybackBar(title string, els ...El) *Element
- func Player(src string, els ...El) *Element
- func PosterCard(title string, mediaType string, els ...El) *Element
- func Pressable(els ...El) *Element
- func ProgressBar(els ...El) *Element
- func ProgressRing(els ...El) *Element
- func RatingControl(els ...El) *Element
- func RelatedRail(title string, els ...El) *Element
- func Rotator(els ...El) *Element
- func Screen(els ...El) *Element
- func SearchBar(els ...El) *Element
- func SeasonSelector(els ...El) *Element
- func Section(title string, els ...El) *Element
- func Select(label string, els ...El) *Element
- func SelectInput(els ...El) *Element
- func SettingsFrame(title string, els ...El) *Element
- func SettingsNavGroup(label string, els ...El) *Element
- func SettingsNavItem(label string, icon string, els ...El) *Element
- func Skeleton(els ...El) *Element
- func Slider(els ...El) *Element
- func SourcePicker(els ...El) *Element
- func Spacer(els ...El) *Element
- func Stack(direction string, gap int, els ...El) *Element
- func State(els ...El) *Element
- func StatusIndicator(label string, tone string, els ...El) *Element
- func Switch(els ...El) *Element
- func Tabs(els ...El) *Element
- func Text(els ...El) *Element
- func TextField(label string, els ...El) *Element
- func TextInput(els ...El) *Element
- func Toggle(label string, els ...El) *Element
- type Node
- type Surface
Constants ¶
const ( ToneNeutral = sdui.ToneNeutral ToneAccent = sdui.ToneAccent ToneSuccess = sdui.ToneSuccess ToneWarning = sdui.ToneWarning ToneDanger = sdui.ToneDanger ToneInfo = sdui.ToneInfo )
Tone values (the open-bag string encoding), re-exported from the producer binding.
const ( SurfaceModal = sdui.SurfaceModal SurfaceSheet = sdui.SurfaceSheet SurfaceDrawer = sdui.SurfaceDrawer )
Variables ¶
var ( Invoke = sdui.Invoke Play = sdui.Play OpenURL = sdui.OpenURL Back = sdui.Back Query = sdui.Query OpenOverlay = sdui.OpenOverlay CloseOverlay = sdui.CloseOverlay Toast = sdui.Toast Sequence = sdui.Sequence SetValue = sdui.SetValue Submit = sdui.Submit )
Action constructors, re-exported from the producer binding; they ride the open props bag as JSON (ADR 0044).
Functions ¶
This section is empty.
Types ¶
type Action ¶
Action is a declarative behaviour envelope, re-exported from the producer binding; it rides the open props bag as JSON (ADR 0044). Author one with the generated constructors (Navigate, Invoke, Play).
func DismissOverlay ¶ added in v0.16.0
func DismissOverlay() Action
DismissOverlay closes the topmost overlay. It is what a cancel control emits: the overlay never navigated anywhere, so there is nothing to navigate back to.
func Overlay ¶ added in v0.16.0
Overlay presents an element over the current screen instead of navigating to it — a confirmation, a picker, a detail sheet.
It is hand-written rather than generated because it is the one action whose argument is a *tree*: the node rides inside the action, so the authoring layer has to build it. The generated constructors take scalars and prop bags.
Reach for it when what you are presenting is a decision about the screen you're on. A screen is the wrong shape for that — it takes the context away and needs a way back to it — which is why the extension install confirmation is this and not a route.
type El ¶
type El interface {
// contains filtered or unexported methods
}
El is anything that composes into an element: a child, a prop, or a slot. A component accepts ...El and lets them intermix.
func A11yLabel ¶ added in v0.25.0
A11yLabel is the accessible name, for when the visible content is not one — an icon-only control, an image that carries meaning. It is deliberately not `label`: a visible label and an accessible name are different things, and one key meaning both is how a control ends up announced as its own caption.
func ActionLabel ¶
ActionLabel sets a Section's "see all" action label (paired with OnTap).
func ActionSlot ¶ added in v0.16.0
ActionSlot fills the "action" slot (an empty state's call to action).
func BindA11yLabel ¶ added in v0.25.0
BindA11yLabel sets "a11yLabel" from the named path instead of from a value.
func BindActionLabel ¶ added in v0.20.0
BindActionLabel sets "actionLabel" from the named path instead of from a value.
func BindActive ¶ added in v0.20.0
BindActive sets "active" from the named path instead of from a value.
func BindAlign ¶ added in v0.20.0
BindAlign sets "align" from the named path instead of from a value.
func BindAvatar ¶ added in v0.20.0
BindAvatar sets "avatar" from the named path instead of from a value.
func BindBackdrop ¶ added in v0.20.0
BindBackdrop sets "backdrop" from the named path instead of from a value.
func BindBadgeText ¶ added in v0.20.0
BindBadgeText sets "badge" from the named path instead of from a value.
func BindCapabilities ¶ added in v0.20.0
BindCapabilities sets "capabilities" from the named path instead of from a value.
func BindCredits ¶ added in v0.20.0
BindCredits sets "credits" from the named path instead of from a value.
func BindDisabled ¶ added in v0.20.0
BindDisabled sets "disabled" from the named path instead of from a value.
func BindError ¶ added in v0.22.0
BindError sets "error" from the named path instead of from a value.
func BindFocusGroup ¶ added in v0.26.0
BindFocusGroup sets "focusGroup" from the named path instead of from a value.
func BindFocusable ¶ added in v0.26.0
BindFocusable sets "focusable" from the named path instead of from a value.
func BindGenres ¶ added in v0.20.0
BindGenres sets "genres" from the named path instead of from a value.
func BindHasMore ¶ added in v0.27.0
BindHasMore sets "hasMore" from the named path instead of from a value.
func BindHasNext ¶ added in v0.20.0
BindHasNext sets "hasNext" from the named path instead of from a value.
func BindHasPrev ¶ added in v0.20.0
BindHasPrev sets "hasPrev" from the named path instead of from a value.
func BindHeading ¶ added in v0.20.0
BindHeading sets "heading" from the named path instead of from a value.
func BindHeadingLevel ¶ added in v0.25.0
BindHeadingLevel sets "headingLevel" from the named path instead of from a value.
func BindIconName ¶ added in v0.20.0
BindIconName sets "icon" from the named path instead of from a value.
func BindIndex ¶ added in v0.20.0
BindIndex sets "index" from the named path instead of from a value.
func BindInitialFocus ¶ added in v0.26.0
BindInitialFocus sets "initialFocus" from the named path instead of from a value.
func BindInputType ¶ added in v0.20.0
BindInputType sets "inputType" from the named path instead of from a value.
func BindItemWidth ¶ added in v0.20.0
BindItemWidth sets "itemWidth" from the named path instead of from a value.
func BindJustify ¶ added in v0.20.0
BindJustify sets "justify" from the named path instead of from a value.
func BindKicker ¶ added in v0.20.0
BindKicker sets "kicker" from the named path instead of from a value.
func BindLoadMore ¶ added in v0.27.0
BindLoadMore sets "loadMore" from the named path instead of from a value.
func BindMessage ¶ added in v0.34.0
BindMessage sets "message" from the named path instead of from a value.
func BindMimeType ¶ added in v0.20.0
BindMimeType sets "mimeType" from the named path instead of from a value.
func BindMinColumnWidth ¶ added in v0.20.0
BindMinColumnWidth sets "minColumnWidth" from the named path instead of from a value.
func BindNativeTitle ¶ added in v0.20.0
BindNativeTitle sets "nativeTitle" from the named path instead of from a value.
func BindNextAction ¶ added in v0.20.0
BindNextAction sets "nextAction" from the named path instead of from a value.
func BindNextFocus ¶ added in v0.26.0
BindNextFocus sets "nextFocus" from the named path instead of from a value.
func BindNodeID ¶ added in v0.20.0
BindNodeID sets "nodeId" from the named path instead of from a value.
func BindOnAppear ¶ added in v0.24.0
BindOnAppear sets "onAppear" from the named path instead of from a value.
func BindOnDisappear ¶ added in v0.24.0
BindOnDisappear sets "onDisappear" from the named path instead of from a value.
func BindOnTap ¶ added in v0.20.0
BindOnTap sets "action" from the named path instead of from a value.
func BindOptions ¶ added in v0.20.0
BindOptions sets "options" from the named path instead of from a value.
func BindOrigin ¶ added in v0.20.0
BindOrigin sets "origin" from the named path instead of from a value.
func BindOverlayTitle ¶ added in v0.35.0
BindOverlayTitle sets "overlayTitle" from the named path instead of from a value.
func BindOverview ¶ added in v0.20.0
BindOverview sets "overview" from the named path instead of from a value.
func BindPartID ¶ added in v0.20.0
BindPartID sets "partId" from the named path instead of from a value.
func BindPlaceholder ¶ added in v0.20.0
BindPlaceholder sets "placeholder" from the named path instead of from a value.
func BindPoster ¶ added in v0.20.0
BindPoster sets "poster" from the named path instead of from a value.
func BindPrevAction ¶ added in v0.20.0
BindPrevAction sets "prevAction" from the named path instead of from a value.
func BindProgress ¶ added in v0.20.0
BindProgress sets "progress" from the named path instead of from a value.
func BindProgressLabel ¶ added in v0.20.0
BindProgressLabel sets "progressLabel" from the named path instead of from a value.
func BindRating ¶ added in v0.20.0
BindRating sets "rating" from the named path instead of from a value.
func BindRatingLabel ¶ added in v0.20.0
BindRatingLabel sets "ratingLabel" from the named path instead of from a value.
func BindResumeAt ¶ added in v0.20.0
BindResumeAt sets "resumeAt" from the named path instead of from a value.
func BindRetry ¶ added in v0.20.0
BindRetry sets "retry" from the named path instead of from a value.
func BindRuntime ¶ added in v0.20.0
BindRuntime sets "runtime" from the named path instead of from a value.
func BindSelected ¶ added in v0.20.0
BindSelected sets "selected" from the named path instead of from a value.
func BindShowTags ¶ added in v0.20.0
BindShowTags sets "showTags" from the named path instead of from a value.
func BindSources ¶ added in v0.20.0
BindSources sets "sources" from the named path instead of from a value.
func BindSubmitAction ¶ added in v0.22.0
BindSubmitAction sets "submitAction" from the named path instead of from a value.
func BindSubmitLabel ¶ added in v0.22.0
BindSubmitLabel sets "submitLabel" from the named path instead of from a value.
func BindSubtitle ¶ added in v0.20.0
BindSubtitle sets "subtitle" from the named path instead of from a value.
func BindSummary ¶ added in v0.20.0
BindSummary sets "summary" from the named path instead of from a value.
func BindThumbnail ¶ added in v0.20.0
BindThumbnail sets "thumbnail" from the named path instead of from a value.
func BindTitle ¶ added in v0.20.0
BindTitle sets "title" from the named path instead of from a value.
func BindValue ¶ added in v0.20.0
BindValue sets "value" from the named path instead of from a value.
func BindWatched ¶ added in v0.20.0
BindWatched sets "watched" from the named path instead of from a value.
func Capabilities ¶ added in v0.16.0
Capabilities are the provider roles a module declares, as chips.
func Content ¶ added in v0.16.0
Content fills the app frame's "content" region — where the current screen renders.
func FocusGroup ¶ added in v0.26.0
FocusGroup makes this node's focusable descendants one stop in the tab order, moved between with the arrow keys — the roving pattern. A rail of forty cards is one stop, not forty.
func Focusable ¶ added in v0.26.0
Focusable marks a node that can take focus. Stated rather than inferred from interactivity: a card that navigates is focusable, and so is a heading a TV viewer needs to land on to read, and only the emit-side knows which.
func Group ¶
Group bundles a slice of elements into one El, so a built slice composes inline alongside other elements — e.g. Screen(Title(t), Group(rows...)).
func HasMore ¶ added in v0.27.0
HasMore says this list is a page of something longer. It is the server's statement, not the client's inference: a page that happens to be full is not evidence there is another one, and a client guessing from the count asks for a page that does not exist.
func HeadingLevel ¶ added in v0.25.0
HeadingLevel is 1-6, the depth of a heading in the screen's outline. Stated rather than inferred from text size, because size is a design decision and outline depth is a structural one — and a screen reader navigates the second.
func IconName ¶ added in v0.17.0
IconName names the glyph a control or row shows. It is not called Icon because Icon is the primitive that renders a glyph as a node of its own; this sets the `icon` prop of something that draws one.
func InitialFocus ¶ added in v0.26.0
InitialFocus asks for focus when this node first appears. At most one per region wins; a screen naming two is stating a preference it does not have.
func Live ¶ added in v0.25.0
Live marks a region whose changes should be announced: "polite" waits for a pause, "assertive" interrupts. Anything else is not announced.
func LoadMore ¶ added in v0.27.0
LoadMore is what fetches the next page. It carries whatever cursor the server needs, because only the server knows what 'next' means for this list — a skip count here, a token elsewhere.
func Message ¶ added in v0.34.0
Message sets the explanation beneath an empty or error state's title. Banner takes its message positionally; every other component that carries one needs this, and without it the emit-side sets the key by string — which is how a prop nothing renders gets shipped.
func MimeType ¶
MimeType sets the media type a Player should expect, so a client can pick a pipeline before it fetches.
func MinColumnWidth ¶ added in v0.16.0
MinColumnWidth is a grid's smallest column before it reflows, in px.
func NativeTitle ¶ added in v0.16.0
NativeTitle is the original-language title shown beside the localised one.
func NextAction ¶ added in v0.16.0
NextAction is what a pagination's next control emits.
func NextFocus ¶ added in v0.26.0
NextFocus overrides where focus goes from here, per direction — {up,down,left,right} to node ids. It is an override, not the mechanism: a client works out the rest geometrically, and this is for the cases geometry gets wrong.
func NodeID ¶
NodeID names the item a Player is playing, so the client can report its position back against it (ADR 0046).
func On ¶ added in v0.16.0
On is a switch's state. Distinct from Value, which is a field's text: one prop key cannot be a string in one component and a boolean in another, and a switch that read \"true\" as text would render on for the string \"false\" too.
func OnAppear ¶ added in v0.24.0
OnAppear is emitted the first time this node becomes visible on screen. The server decides what that means by choosing the action; a client never reports anything it was not asked to.
func OnDisappear ¶ added in v0.24.0
OnDisappear is emitted when this node leaves the screen, having been visible.
func Origin ¶ added in v0.16.0
Origin is where a thing came from — an extension's id, version and repository. Distinct from Meta, which is a hero's variadic meta line: the same key cannot be a string in one component and a list in another.
func OverlayTitle ¶ added in v0.35.0
OverlayTitle lays a tile's title over its artwork instead of beneath it, for a card that is mostly image — the hero's up-next dock. Off by default, because a title on the picture is only legible when the tile is large enough to carry a scrim under it.
func PartID ¶
PartID names the release a Player is playing, recorded with the position so a resume returns to the same encode (ADR 0046).
func Placeholder ¶ added in v0.16.0
Placeholder is a field's empty-state hint.
func PrevAction ¶ added in v0.16.0
PrevAction is what a pagination's previous control emits.
func ProgressLabel ¶ added in v0.16.0
ProgressLabel describes progress in words ("24m left").
func RatingLabel ¶ added in v0.16.0
RatingLabel is the source a rating came from.
func Selected ¶ added in v0.16.0
Selected says a section was asked for rather than defaulted to — what lets one payload drill down on a phone and show two panes on a desktop.
func SubmitAction ¶ added in v0.22.0
SubmitAction is what a Form emits when it is submitted, with the scope's values merged into its input.
func SubmitLabel ¶ added in v0.22.0
SubmitLabel is the text on a form's submit control.
func Vars ¶ added in v0.21.0
Vars declares a State scope's variables — each a name, a type ("string", "number" or "boolean") and an initial value. Declared rather than inferred: a client must know a name exists before anything writes to it, and must know what to coerce a written value to.
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
Element is a UI node under construction. It is itself an El — placing it in a parent adds it as a child — and Build() compiles it (and its subtree) to the protobuf Node.
func AppShell ¶ added in v0.16.0
AppShell is the application frame (ADR 0031): the brand bar, the nav and the region the current screen renders into.
func Box ¶ added in v0.17.0
Box is the layout container every composition is built from. Native: The irreducible layout leaf. A definition is a tree of primitives, so the base case cannot itself be a definition. It also resolves style.responsive against the live viewport, which is a render-time branch no static tree can carry.
func Component ¶
Component is the generic constructor for a type without a helper (a standard component like SeasonSelector, or a module's own).
func DetailHeader ¶
DetailHeader renders a node's metadata (title, meta, genres).
func DetailHero ¶ added in v0.16.0
DetailHero is a title's cinematic header — backdrop, logo and the actions docked over it.
func EmptyState ¶
EmptyState is a titled empty placeholder, with an optional explanation beneath it and a call to action.
func EpisodeRow ¶
EpisodeRow renders one episode under a season.
func ErrorState ¶ added in v0.16.0
ErrorState renders a Platform error category as something a person can act on.
func ExtensionCard ¶ added in v0.16.0
ExtensionCard is one extension module — what it is, what it can do, and where its bytes come from (ADR 0081).
func Form ¶ added in v0.17.0
Form is a State scope with a submit control: it declares the fields' variables, hosts them, and emits its submit action with their values merged in. Composed rather than native — it is a State, an Outlet and a button, and nothing about it needs client code.
func Fragment ¶ added in v0.17.0
Fragment renders its children with no wrapper of its own. Native: A transparent grouping node the expander needs in order to return several nodes where one is expected.
func Icon ¶ added in v0.16.0
Icon renders one glyph from the client's bundled icon set. Native: Resolves a name to a vector the client ships. The glyph set is a client asset, not data.
func IconButton ¶ added in v0.16.0
IconButton is a Button reduced to its icon; the label stays for assistive tech.
func Image ¶ added in v0.17.0
Image renders a remote or proxied image with a placeholder fallback. Native: Loading a resource, handling decode failure and falling back to a placeholder are client behaviours. It also feeds the art-light sampler, which reads decoded pixels.
func InfoPanel ¶ added in v0.16.0
InfoPanel is a docked facts panel — a rating and a run of label/value rows.
func Menu ¶ added in v0.17.0
Menu is a click-to-open list of actions behind a trigger. Native: Owns its open/closed state.
func NavBar ¶ added in v0.17.0
NavBar groups NavItems into the frame's responsive navigation. Native: Presents as an inline bar or a bottom tab strip depending on the viewport — a render-time branch, not data.
func NavItem ¶ added in v0.17.0
NavItem is one entry in the app frame's navigation. Native: Owns active-route state: it compares the current screen against its own target, which only the client knows.
func Outlet ¶ added in v0.17.0
Outlet marks the point in a definition's template where the caller's slot content is substituted. Native: It is the definition expander's own mechanism. A definition defined in terms of Outlet cannot itself be expanded without it, so it must be native.
func Pagination ¶ added in v0.16.0
Pagination is a prev/next pair. The server supplies both targets; the client does no arithmetic.
func PlaybackBar ¶ added in v0.16.0
PlaybackBar is the resume strip for something already started.
func Player ¶
Player is the playback surface. Native: The client owns the decoding pipeline and the transport controls (ADR 0047, ADR 0070). A scrub bar cannot be driven over a network at frame rate.
func PosterCard ¶
PosterCard renders a work/item card.
func Pressable ¶ added in v0.17.0
Pressable makes its subtree activate an Action. Native: Turning a pointer, key or remote-control event into an Action dispatch is client behaviour.
func ProgressBar ¶ added in v0.17.0
ProgressBar shows a linear completion fraction. Native: Fill geometry is computed from the value at render.
func ProgressRing ¶ added in v0.17.0
ProgressRing shows a circular completion fraction with the percentage inside. Native: Arc geometry is computed from the value at render.
func RatingControl ¶ added in v0.17.0
RatingControl selects a star rating. Native: Owns the selection.
func RelatedRail ¶ added in v0.16.0
RelatedRail is a titled rail that says so when it is empty.
func Rotator ¶ added in v0.17.0
Rotator cross-fades through its children on a timer. Native: Owns a timer and derives the active index from it, and republishes the active slide's palette to the acrylic surfaces.
func SearchBar ¶ added in v0.17.0
SearchBar is the frame's persistent search entry. Native: The submitted action must carry the live input value, and in a live session the value streams up debounced as it changes.
func SeasonSelector ¶ added in v0.17.0
SeasonSelector picks one season of a series. Native: Owns the selected season.
func SelectInput ¶ added in v0.17.0
SelectInput is a bare dropdown. Native: Owns its selected value.
func SettingsFrame ¶ added in v0.16.0
SettingsFrame is the Platform-owned settings chrome (ADR 0038): a nav beside the panel the open section fills.
func SettingsNavGroup ¶ added in v0.16.0
SettingsNavGroup is one labelled run of settings nav rows.
func SettingsNavItem ¶ added in v0.16.0
SettingsNavItem is one settings nav row. The server marks the active one — it is the side that knows the params (ADR 0039).
func Skeleton ¶ added in v0.17.0
Skeleton is an animated loading placeholder. Native: Expands to a repeated animated shape; the animation is a client concern.
func Slider ¶ added in v0.17.0
Slider selects a number in a range. Native: Displays its own live value beside itself, so output couples to internal state.
func SourcePicker ¶ added in v0.16.0
SourcePicker lists the resolved sources for a Part.
func Spacer ¶ added in v0.17.0
Spacer occupies empty space in a stack, fixed or growing. Native: An irreducible layout leaf.
func State ¶ added in v0.21.0
State declares named variables and scopes them to its subtree. Children bind to them by name, and a setValue action writes them. Native: It holds values across renders. A tree is a description of one moment; something has to remember what was typed between two of them, and no arrangement of static nodes can. It is also the scope boundary itself — which of two enclosing States a name resolves to is a question only the renderer, walking its own tree, can answer.
func StatusIndicator ¶ added in v0.16.0
StatusIndicator is a coloured dot with a label.
func Tabs ¶ added in v0.17.0
Tabs shows one panel at a time behind a tab strip. Each tab's content goes in the named slot matching its id, not in the ordered child list — an ordered child is dropped. Native: Owns the active tab index.
func Text ¶ added in v0.17.0
Text renders a run of text in a token style. Children render after the text, for inline nesting. Native: The irreducible text leaf.
func TextInput ¶ added in v0.17.0
TextInput is a bare text entry field. Native: Owns its input value between keystroke and submission.
func Toggle ¶ added in v0.16.0
Toggle is a switch with a label. It carries the value it moves TO — the client reports the flip, the server decides what it means.
func (*Element) BuildJSON ¶
BuildJSON compiles the element and marshals it to the canonical protojson UINode encoding — the bytes a client (or the Platform) decodes with protojson. It lets a producer that returns wire bytes (e.g. a module's settings UI, ADR 0038) emit them without importing protojson itself.