widget with switch button unreal engine

You can see it in the second screenshot with the red dot - you choose it from the list. Create the variable first as shown in the first pic.

Do not create a function binding - there’s no need.