FormToggle
A component that can be a quick indicator for switching condition.
FormToggleBosons
Id
required
Id of checkbox inside toggle.
type:
string
Label
Text of label
type:
string
Checked
required
Information about checked input
type:
bool
default:
false
Slot
If true then can use show children.
type:
bool
default:
false
Size
Component size
type:
string
default:
md
values:
sm, md, lg
Attrs
Sets attributes in the html tag.
type:
gopress.Attrs
Examples
Default form toggle
1// Default FormToggle
2
3@atoms.FormToggle(&atoms.FormToggleBosons{
4 Id: "default",
5 Size: "md",
6 Checked: false,
7 Label: "Component activity",
8})
FormToggle with component in slot
Additional information about enabling/off activity
1// FormToggle with slot
2
3@atoms.FormToggle(&atoms.FormToggleBosons{
4 Id: "withslot",
5 Size: "md",
6 Checked: false,
7 Label: "Component activity",
8}) {
9 @atoms.FormValid(&atoms.FormValidBosons{
10 Info: "Additional information about enabling/off activity",
11 })
12}