Bus UI Submit Control

A submit button with visible lifecycle state.

Use the submit control when the module needs idle, working, success, or error feedback without giving up native submit behavior.

Public surface

FunctionProps typeImport path
SubmitControlSubmitControlPropsgithub.com/busdk/bus-ui/pkg/ui

When to use it

Use SubmitControl when the control should switch label and disabled state as the form moves between idle, working, success, and error. This helper is on pkg/ui.

See also Form, Filter toolbar, and Reference.

Example

Loading SubmitControl demo...

Go API

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

node, err := ui.SubmitControl(ui.SubmitControlProps{
  State: ui.SubmitStateWorking,
  Label: "Saving",
})
if err != nil {
  return err
}

html, err := gx.RenderHTML(node)

.gx source

In .gx source, author the visible component state as GX markup. Keep the Go API block above for the package helper or render-boundary call.

package busuiexamples

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

func SubmitControlExample() gx.Node {
  return <button class="submit-control" type="submit">
  <Text value={"Save"}></Text>
</button>
}