Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ToggleFixtures = gx.Fixtures[ToggleProps]{ "Off": {Name: "bold", Children: gx.Text("Bold")}, "On": {Name: "bold", Pressed: true, Children: gx.Text("Bold")}, "Disabled": {Name: "bold", Disabled: true, Children: gx.Text("Bold")}, "Outline": {Name: "bold", Variant: Outline, Children: gx.Text("Bold")}, "OutlineOn": {Name: "bold", Variant: Outline, Pressed: true, Children: gx.Text("Bold")}, "Invalid": {Name: "bold", Variant: Outline, Invalid: true, Children: gx.Text("Bold")}, "Small": {Name: "bold", Variant: Outline, Size: Sm, Children: gx.Text("Bold")}, "Large": {Name: "bold", Variant: Outline, Size: Lg, Children: gx.Text("Bold")}, }
Functions ¶
func Toggle ¶
func Toggle(p ToggleProps) gx.Node
Types ¶
type ToggleProps ¶
type ToggleProps struct {
// Variant sets the visual style: Default or Outline.
Variant Variant
// Size sets the height and padding: Sm, Md or Lg.
Size Size
// Name is the form field name.
Name string
// Value is the value the form submits when the toggle is pressed.
Value string
// Pressed sets the toggle to pressed for the first render.
Pressed bool
// Disabled disables the toggle.
Disabled bool
// Invalid sets aria-invalid on the input and shows the error style.
Invalid bool
// Class adds classes to the root element.
Class string
// Children is the toggle label.
Children gx.Node
// Attrs adds HTML attributes to the root element.
Attrs gx.Attrs
}
Click to show internal directories.
Click to hide internal directories.