Creates a new Toggle instance.
Configuration options for the toggle appearance and behavior
OptionalisToggled: booleanInitial toggle state (default: false). Prefer using options.startingValue instead.
OptionaldestroyedGets the current toggle state
OptionalskipUpdate: booleanOptionalpoint: PointOptionalskipUpdate: booleanOptionalrect: RectangleOptionalfn: EventListenerOptionalcontext: unknownOptionalcontext: unknownOptionalcontext: unknownRegisters a callback to be invoked when the toggle state changes.
Function to call with the new toggle state (boolean)
Optionalevent: stringOptionalbeginIndex: numberOptionalendIndex: numberOptionalfn: EventListenerOptionalpoint: PointOptionalfrom: DisplayObjectOptionalpoint: Point
Animated toggle switch component with customizable colors and optional labels. Supports smooth color transitions between on/off states.
Example