All Projects → SimformSolutionsPvtLtd → SSSwiftUISpinnerButton

SimformSolutionsPvtLtd / SSSwiftUISpinnerButton

Licence: MIT license
SSSwiftUISpinnerButton is a collection of various spinning animations for buttons in SwiftUI.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to SSSwiftUISpinnerButton

FlutterLoadingGIFs
Loading indicator GIFs. Material and Cupertino (Android and iOS) loading indicators in assorted sizes. Use as placeholders for loading remote image assets. Demo: https://gallery.codelessly.com/flutterwebsites/loadinggifs/
Stars: ✭ 28 (-24.32%)
Mutual labels:  animations, loading-animations, loading-spinner, loading-indicator
Whirl
CSS loading animations with minimal effort!
Stars: ✭ 774 (+1991.89%)
Mutual labels:  loader, loading, loading-animations, loading-spinner
Xamarin.Android.AVLoadingIndicatorView
🔰 AVLoadingIndicatorView is a collection of nice loading animations for Xamarin.Android.
Stars: ✭ 26 (-29.73%)
Mutual labels:  loading, animations, loading-animations
Iprogresshud
An elegant, lightweight and responsive progress HUD for iOS app with very simple usage. Available 32 indicators by NVActivityIndicatorView.
Stars: ✭ 66 (+78.38%)
Mutual labels:  loading, loading-animations, loading-spinner
busy-load
A flexible loading-mask jQuery-plugin
Stars: ✭ 76 (+105.41%)
Mutual labels:  loader, loading, loading-spinner
React Epic Spinners
Reusable react components for epic-spinners
Stars: ✭ 280 (+656.76%)
Mutual labels:  animations, loading-animations, loading-spinner
spinnies
Node.js module to create and manage multiple spinners in command-line interface programs
Stars: ✭ 111 (+200%)
Mutual labels:  loading, loading-spinner, loading-indicator
Spinners React
Lightweight SVG/CSS spinners for React
Stars: ✭ 254 (+586.49%)
Mutual labels:  loader, loading, loading-spinner
Epic Spinners
Easy to use css spinners collection with Vue.js integration
Stars: ✭ 3,548 (+9489.19%)
Mutual labels:  animations, loading-animations, loading-spinner
react-bones
💀 Dead simple content loading components for React and React-Native. 💀
Stars: ✭ 42 (+13.51%)
Mutual labels:  loading, animations, loading-animations
Waitme
jquery plugin for easy creating loading css3/images animations
Stars: ✭ 302 (+716.22%)
Mutual labels:  loader, loading, loading-animations
loading
Laravel package to add loading indicator to pages while page is loading.
Stars: ✭ 38 (+2.7%)
Mutual labels:  loader, loading-animations, loading-spinner
ngx-loader-indicator
Awesome loader for angular applications. No wrappers only you elements
Stars: ✭ 44 (+18.92%)
Mutual labels:  loader, loading, loading-spinner
Ngx Skeleton Loader
Make beautiful, animated loading skeletons that automatically adapt to your Angular apps
Stars: ✭ 278 (+651.35%)
Mutual labels:  loader, loading, loading-animations
Ssspinnerbutton
Forget about typical stereotypic loading, It's time to change. SSSpinnerButton is an elegant button with a diffrent spinner animations.
Stars: ✭ 357 (+864.86%)
Mutual labels:  loader, loading, animations
respinner
Pretty and customizable svg spinners for React.js
Stars: ✭ 89 (+140.54%)
Mutual labels:  loading, loading-animations, loading-spinner
React Content Loader
⚪ SVG-Powered component to easily create skeleton loadings.
Stars: ✭ 11,830 (+31872.97%)
Mutual labels:  loader, loading
Vue Loaders
Vue + loaders.css
Stars: ✭ 127 (+243.24%)
Mutual labels:  loader, loading
Ng Block Ui
Block UI Loader/Spinner for Angular
Stars: ✭ 135 (+264.86%)
Mutual labels:  loader, loading
Ocskeleton
[OCSkeleton] - Make your loading view a little difference.
Stars: ✭ 184 (+397.3%)
Mutual labels:  loader, loading-animations

SSSwiftUISpinnerButton

SSSwiftUISpinnerButton is an open-source library in SwiftUI to add different spinning animation to button.

Platform swiftUI Swift Version License PRs Welcome

Alt text

Features!

  • Various spinner animation styles
  • Rounded button on spinning animation

Requirements

  • iOS 13.0+
  • Xcode 11+

Installation

CocoaPods

  • You can use CocoaPods to install SSSwiftUISpinnerButton by adding it to your Podfile:

     use_frameworks!
     pod 'SSSwiftUISpinnerButton'
    
  • Import SSSwiftUISpinnerButton in your file:

     import SSSwiftUISpinnerButton
    

Manually

  • Download and drop SSSwiftUISpinnerButton/Sources folder in your project.
  • Congratulations!

Swift Package Manager

  • When using Xcode 11 or later, you can install SSSwiftUISpinnerButton by going to your Project settings > Swift Packages and add the repository by providing the GitHub URL. Alternatively, you can go to File > Swift Packages > Add Package Dependencies...

     dependencies: [
         .package(url: "https://github.com/mobile-simformsolutions/SSSwiftUISpinnerButton.git", from: "1.0.0")
     ]
    

Usage Examples

Add Spinner Button

  • Add state variable to manage spinner button start and stop animation

    @State var isSpinnerButtonAnimating: Bool = false
    
  • Add Spinner button:

    SpinnerButton(buttonAction: {
             // Your button action code here
         }, isAnimating: $isSpinnerButtonAnimating, builder: {
             // Add any view or content in button if required
             HStack {
                   Text("Save")
                     .foregroundColor(.white)
             }
         }
     )
    

Start Animation

  • Animation will start as soon as you will tap on the button (isSpinnerButtonAnimating state variable will be set true).

Stop Animation

  • To stop the spinner button animation, simply toggle the state variable isSpinnerButtonAnimating value.

    isSpinnerButtonAnimating.toggle()
    

Spinner button animation style

  • You can select from different animation styles

  • Every animation style has properties such as count, size, etc which can be modified.

    SpinnerButton(buttonAction: {
             /// Action to perform
       }, isAnimating: $isSpinnerButtonAnimating, 
          animationType: SpinnerButtonAnimationStyle.lineSpinFade(count: 8, width: 0)) {
               /// Add content in button
       }
    

Spinner button customisation

  • You can modify view of the spinner button using SpinnerButtonViewStyle

  • Initialise variable with type SpinnerButtonViewStyle to design button:

    private var buttonStyleWithBasicDesign: SpinnerButtonViewStyle = SpinnerButtonViewStyle(
          width: 300, 
          height: 50, 
          cornerRadius: 5, 
          backgroundColor: .black, 
          spinningButtonBackgroundColor: .black, 
          spinningStrokeColor: .white
    )
    
  • Assign it to buttonstyle:

    SpinnerButton(buttonAction: {
            /// Action to perform
       }, isAnimating: $isSpinnerButtonAnimating, 
          buttonStyle: buttonStyleWithBasicDesign,
          animationType: SpinnerButtonAnimationStyle.lineSpinFade(count: 8, width: 0)) {
            /// Add content in button
       }
    

Swift Library:

Meta

  • Distributed under the MIT license. See LICENSE for more information.

Inspired By:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].