Skip to content

Collection of SwiftUI objects and animations templates ๐Ÿ‘จโ€๐Ÿ’ป

License

Notifications You must be signed in to change notification settings

nodsader/SwiftUI-animations-objects-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SwiftUI-animations-objects-templates

Collection of SwiftUI objects and animations templates ๐Ÿ‘จโ€๐Ÿ’ป

This repository aims to provide a collection of SwiftUI templates that allow you to create various objects and animations in your iOS, iPadOS, or MacOS applications. You can use them however you like, and I will be adding some animations from time to time. If you wish, you can also enhance certain code snippets to make them visually more appealing or more descriptive. It's under the MIT license, so you're free to use this repository as you see fit. Enjoy and may the code be with you ๐Ÿค™

๐Ÿ‘ The Picker Reaction


It's a simple menu that has an enum, to which we assign an id allowing to then use tags when images are used to click on a reaction defined in the picker. It is possible to modify the apnce of this picker via a separate view which will use a Binding.

๐ŸŽ† Buttons with particle effect


Here it is a little more complex. We use three views and a model composed of a structure allowing to attribute the basic values โ€‹โ€‹to the future animation which will occur once the button is clicked. We then configure the buttons that will be created as well as their design in the "MainView" view. It is here that we also specify that we expect a tap on the button to trigger an animation. The one that will be created in the "Particule Effect" view. In the latter we provide x and y values โ€‹โ€‹to generate the animation flow that will spring from an x โ€‹โ€‹and y of the button when it is activated by the user. There is no need for any package or specific add-on to recreate this animation, it works as long as you use system images or configure personal ones, remembering to adapt the structure appropriately.

๐Ÿ“ธ Web Image Gallery


A page that allows images to be displayed via URL, via an asyncImage method available on SwiftUI. The user also has the option of clicking on each image to preview it at the maximum size of their screen.

๐Ÿ˜ƒ Animated slider


This is a rather nice slider with a color gradient background, which allows you to choose an emotional state between sad, neutral, happy and very happy. It is of course possible to adapt it in many ways.

๐Ÿ˜ฎโ€๐Ÿ’จ Breathing Form


This time we start with an animated shape created directly with SwiftUI. The latter follows a breathing type pattern that will make the shape grow for a few seconds and then maintain this state before shrinking to indicate the inspiration and expiration that the user must perform. In addition to this, there is also a haptic feedback system emitting more vibrations when the shape grows, they are lighter when it shrinks. I left some Mark in the code to help you understand it better.

๐Ÿž๏ธ Slide


The slide is, as its name suggests, an image carousel very easy to implement and which offers a kind of reduction and extension of the width of an image when scrolling through the carousel. This is made possible thanks to several GeometryReaders.

About

Collection of SwiftUI objects and animations templates ๐Ÿ‘จโ€๐Ÿ’ป

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages