Bus UI Input
Input is the typed base control.
Use Input when a module needs one validated native input with an explicit
type, stable attributes, and node-first composition through InputProps.
Validated surface
| Function | Input, InputChecked, InputNodeChecked |
|---|---|
| Props | InputProps |
| Import path | github.com/busdk/bus-ui/pkg/ui |
| Use for | Shared text, search, email, URL, number, date, password, checkbox, radio, and hidden inputs. |
Example
Loading Input demo...
Go API
import (
ui "github.com/busdk/bus-ui/pkg/ui"
)
node, err := ui.Input(ui.InputProps{
Type: string(ui.InputTypeSearch),
Name: "query",
Placeholder: "Search evidence",
})
.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 InputExample() gx.Node {
return <label class="field" for="description">
<Text value={"Description"}></Text>
<input id="description" name="description" type="text"></input>
</label>
}