Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SwitchFixtures = gx.Fixtures[SwitchProps]{ "Off": {Name: "wifi", Label: "Wifi"}, "On": {Name: "wifi", Label: "Wifi", Checked: true}, "Disabled": {Name: "wifi", Label: "Wifi", Disabled: true}, "Small": {Name: "wifi", Label: "Wifi", Size: Sm}, "SmallOn": {Name: "wifi", Label: "Wifi", Size: Sm, Checked: true}, }
Functions ¶
func Switch ¶
func Switch(p SwitchProps) gx.Node
Types ¶
type SwitchProps ¶
type SwitchProps struct {
// Size sets the size of the track and the thumb: Md or Sm.
Size Size
// Name is the form field name.
Name string
// Label is the accessible name of the switch.
Label string
// Value is the value the form submits when the switch is on.
Value string
// Checked sets the switch on for the first render.
Checked bool
// Disabled disables the switch.
Disabled bool
// Class adds classes to the root element.
Class string
// Attrs adds HTML attributes to the root element.
Attrs gx.Attrs
}
Click to show internal directories.
Click to hide internal directories.