Bus UI Status

LoadingState marks work in progress.

Use LoadingState for busy, pending, or progress-aware states with accessible status semantics.

Public API

Functionui.LoadingState
Propsui.LoadingStateProps
Use forPending work, background refresh, and progress-aware surfaces.

Example

Loading LoadingState demo...

Go API

import (
  gx "github.com/busdk/bus-gx/pkg/gx"
  ui "github.com/busdk/bus-ui/pkg/ui"
)

progress := 45
node, err := ui.LoadingState(ui.LoadingStateProps{
  Message:         "Importing files",
  ProgressLabel:   "Import progress",
  ProgressPercent: &progress,
})

html, err := gx.RenderHTML(node)

In .gx source, keep the pointer-backed progress value in the wrapper and pass labels through lower-camel attributes.

In .gx source, the loading state is a live region whose label remains visible in markup.

.gx source

package statusui

import gx "github.com/busdk/bus-gx/pkg/gx"

type LoadingReportProps struct {
  Label string
}

func LoadingReport(props LoadingReportProps) gx.Node {
  return <section class="loading-state" aria-live="polite">
  <p><Text value={props.Label}></Text></p>
</section>
}

var loading = <LoadingReport label={"Loading report"}></LoadingReport>