Contents

terlan98/circularreveal

A SwiftUI package for presenting views with a circular animation.

πŸ“¦ Features

  • Trigger with a boolean or an arbitrary item
  • Set custom animation duration
  • Execute a closure when the presented view is dismissed

πŸ›  Installation

You can install CircularReveal 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...

πŸš€ Usage

Example

struct FirstView: View {
    @State private var isRevealed = false

    var body: some View {
        VStack {
            Text("This is the first view")

            Button("Present Second View") {
                isRevealed = true
            }
        }
        .circularReveal(isRevealed: $isRevealed) {
            SecondView(isRevealed: $isRevealed)
        }
    }
}
struct SecondView: View {
    @Binding var isRevealed: Bool

    var body: some View {
        VStack {
            Text("This is the second view")
  
            Button("Dismiss Second View") {
                isRevealed = false
            }
        }
    }
}

For more examples, check out the Examples folder

🀝 Contribution

I highly appreciate and welcome any issue reports, feature requests, pull requests, or GitHub stars you may provide.

License

CircularReveal is released under the MIT license.

<a href="https://www.buymeacoffee.com/terlan98" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 2.5em !important;width: 9em !important;" ></a>

Package Metadata

Repository: terlan98/circularreveal

Default branch: main

README: README.md