struct Toggle
Swift
struct Toggle
A boolean switch with an animated knob.
The value lives wherever the Binding points; the node keeps only what is
needed to draw the transition. That split matters: flipping the binding
from anywhere — another control, a model update, a keyboard shortcut — still
animates, because configure retargets from the bound value on every
reconcile rather than only from the click handler.
Sources/LavaUI/Toggle.swift:10
Constructors
init(_ label: String = "", isOn: Binding<Bool>, style: ToggleStyle = ToggleStyle(), font: UIFont? = nil, isEnabled: Bool = true)
Not documented.
Sources/LavaUI/Toggle.swift:17
Properties
var dumpDetail: String { get }
Not documented.
Sources/LavaUI/Toggle.swift:33
var font: UIFont?
Not documented.
Sources/LavaUI/Toggle.swift:14
var isEnabled: Bool
Not documented.
Sources/LavaUI/Toggle.swift:15
var isOn: Binding<Bool>
Not documented.
Sources/LavaUI/Toggle.swift:12
var label: String
Not documented.
Sources/LavaUI/Toggle.swift:11
var resolvedFont: UIFont? { get }
Not documented.
Sources/LavaUI/Toggle.swift:31
var style: ToggleStyle
Not documented.
Sources/LavaUI/Toggle.swift:13
Methods
func mountPrimitive() -> any AnyViewNode
Not documented.
Sources/LavaUI/Toggle.swift:37
func reconcilePrimitive(_ node: any AnyViewNode) -> any AnyViewNode
Not documented.
Sources/LavaUI/Toggle.swift:54