add class option in SwitchWidget