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}

Let's dive deeper and connect!

Gopress is brought to you by Pay For Done. We specialize in crafting products and services rooted in design systems. Join our community to discuss how we can support you.


© 2024 Pay For Done. All Rights Reserved. Website compliant with W3C validation.