Bus UI Status Components
Visible state for success, absence, progress, and recoverable errors.
Status pills, empty states, loading states, result panels, and error banners now
come through pkg/ui. Use these helpers when a view needs human-readable
state without taking ownership of the underlying workflow.
Public APIs
| Component | Use it for | Public API | Current path |
|---|---|---|---|
| StatusPill | Compact semantic labels such as success, working, warning, or danger. | StatusPill / StatusPillProps | pkg/ui |
| EmptyState | Visible absence surfaces with an optional recovery action. | EmptyState / EmptyStateProps | pkg/ui |
| LoadingState | Busy, pending, or progress-aware loading surfaces. | LoadingState / LoadingStateProps | pkg/ui |
| ResultPanel | Operation outcomes with a title, summary, and follow-up actions. | ResultPanel / ResultPanelProps | pkg/ui |
| ErrorBanner | Recoverable page errors with retry and dismiss actions. | ErrorBanner / ErrorBannerProps | pkg/ui |
Example
Status pills, empty states, loading states, result panels, and error banners are all available through the preferred facade.
Go API
import (
gx "github.com/busdk/bus-gx/pkg/gx"
ui "github.com/busdk/bus-ui/pkg/ui"
)
node, err := ui.StatusPill(ui.StatusPillProps{
Label: "Ready",
Status: ui.StatusSuccess,
})
html, err := gx.RenderHTML(node)
In .gx source, wrap the error-returning status helper
and use the wrapper from markup.
In .gx source, status pieces are small markup regions that can be composed into product pages.
.gx source
package statusui
import gx "github.com/busdk/bus-gx/pkg/gx"
type StatusOverviewProps struct {
Title string
}
func StatusOverview(props StatusOverviewProps) gx.Node {
return <section class="status-overview">
<h2><Text value={props.Title}></Text></h2>
<p class="status-pill"><Text value={"Ready"}></Text></p>
</section>
}
var overview = <StatusOverview title={"Import status"}></StatusOverview>
Return to the Components index or the Reference.