Awesome Open Source
Awesome Open Source


SHSliderSwitch is a simple lightweight library to implement an animated slider switch.

Swift 4.0 License Platform


Just drag and drop the SHSliderSWitch.swift file from SHSliderSWitch folder to your project.


pod 'SHSliderSwitch'


  1. Just drag and drop an view in storyboard and set view class to SHSliderSWitch.
  1. How to configure:

-- can configure using IBInspectable.

-- configure manually.

  //Current value of the switch. Defaults to 0.
  sliderSwitch.value = 0.0
  /// Minimum value. Must be less than maximumValue. Defaults to 0.
  sliderSwitch.minimumValue = 0.0
  /// Maximum value. Must be more than minimumValue. Defaults to 100.
  sliderSwitch.maximumValue = 100.0
  /// Increment value  in switch. Defaults to 1.
  sliderSwitch.stepValue = 1
  /// Text color of the circular label. Defaults to white.
  sliderSwitch.labelTextColor = UIColor.white
  /// Background color of the circular label. Defaults to lighter white.
  sliderSwitch.labelBackgroundColor =
  /// Font of the circular label. Defaults to Futura-Medium, 14.0 points in size.
  sliderSwitch.labelFont = UIFont(name: "Futura-Medium", size: 14.0)
  /// Border width of the switch and circular label's layer. Defaults to 0.0.
  sliderSwitch.borderColor = 0.0
  /// Color of the border of the switch and circular label's layer. Defaults to clear color.
  sliderSwitch.borderColor = UIColor.clear
  /// Font of the buttons. Defaults to Futura-Bold, 20.0 points in size.
  sliderSwitch.buttonsFont = UIFont(name: "Futura-Bold", size: 20.0)
  /// Text color of the buttons. Defaults to white.
  sliderSwitch.buttonsTextColor = UIColor.white


  • iOS 11.0+


Download the Sample project.


Mail me @: [email protected]


Inspired by GMStepper


SHSliderSwitch is available under the MIT license. See the LICENSE file for more info.

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Swift (66,703
Animation (17,672
Drag (9,896
Switch (8,211
Slider (4,874
Animated (3,895