10 SwiftUI Libraries To Use In 2021
The coolest offerings for iOS, macOS, watchOS, and tvOS developers
SwiftUI has truly changed how we design and think about iOS apps. After making its debut at WWDC 2019, Apple took things a notch further by introducing a bunch of new views, property wrappers, and custom types.
However, the declarative framework is still in the nascent stage. SwiftUI’s bugs make it tricky to use in production. Also, we’ve yet to see many advanced use cases of SwiftUI in iOS applications.
Regardless, a lot of developers have jumped on the bandwagon and built some amazing SwiftUI libraries that you can plug and play in your iOS apps.
Let’s walk through a few of them.
1. PermissionsSwiftUI
Apple is known to bump up app permissions every year — whether it’s through the introduction of approximate location access, a limited photo library, or the latest iOS 14 ad tracking permission.
This transparency with permissions is a boon for consumers and a headache for advertisers.
This library encompasses all 12 iOS permissions in Apple’s default style. You can easily toggle between them from the bottom sheet.

The JMPermission
view modifier can be set on any view to display the modal sheet, as shown below:
.JMPermissions(showModal: $showModal, for: [.photo, .microphone])
Also, the library lets you set custom permission text, images, and icons to give the user better context using setPermissionComponent
.
2. Liquid
Splash screens are always desirable in any app. Often, teams tend to hire designers to create eye-catching artwork.
Thankfully, we have a ready-made Swift package that does just that. This library lets you integrate liquid animated backsplash views in your SwiftUI interface by simply using the Liquid()
custom view:

3. FontAwesomeSwiftUI
FontAwesome icons are widely used by organizations across their apps and website. The fact that the icons are vector shapes implies that one doesn’t lose quality when resizing them.
A universal nomenclature only ensures that one can change the icons of their Android, iOS, and web apps on the fly from the cloud.
This library helps bring FontAwesome 5 icons to your SwiftUI apps by leveraging the power of enums. For iOS apps, all you need to do is:
FontAwesome.register()
Once that’s set, you can set vector icons in the SwiftUI Text
, as shown below:
Text(AwesomeIcon.btc.rawValue)
.font(.awesome(style: .brand, size: 20))
.foregroundColor(.white)

4. StepperView
Steppers are a vital component of apps today. They help send real-time progress feedback to the user. Sadly, SwiftUI doesn’t support a native Stepper view at the moment.
But this library strives to make your development easier by providing out-of-the-box support for StepperView
. You can quickly create vertical and horizontal steppers with custom indicator views, types, lines, and text alignments.

5. PopupView
Unlike in Android, built-in toasts have long been absent from iOS. Despite the emergence of iOS 14, which has an “AirPods Connected” notification, the UI is largely absent from the Apple ecosystem.
PopupView is just the library to solve that issue. As the name suggests, this Swift package helps display toasts and popups in your SwiftUI interface.
It comes with the following optional parameters for customizing the views:
type
— toast, float, or defaultposition
— top or bottom (for a default case, it just determines animation direction)animation
— custom animation for popup sliding onto the screenautohideIn
— time after which popup should disappear

6. AlertX
Popups differ from Alert dialogs since the former don’t require buttons and can be auto-dismissed.
If the default iOS alerts look too boring, here’s a library to make things a lot more interesting.
AlertX is a library that helps you easily set up custom alerts in SwiftUI. From changing the background theme to adding rounded corners, multiple buttons, and animations, there is a long list of things you can achieve with this library.
Here’s what a simple line of code can achieve:
AlertX.Theme.wine(withTransparency: false, roundedCorners: true)

7. ActivityIndicatorView
SwiftUI in iOS 14 brought a few advancements. However, it’s still lacking a native Activity Indicator. True, one can use the ProgressView
to display indeterminate loaders to some extent. Then again, it can’t be customized to great lengths.
The ActivityIndicatorView library presents a variety of preset loading indicators created in SwiftUI. From choosing the type of indicator to adding colors and gradients, you can do quite a few things to display your favorite progress indicator.

8. MarkdownUI
We all love Markdown editors, don’t we? They let you write formatted text on the web with a standard syntax.
SwiftUI lacks this essential tool, and though one can leverage the UITextView
by using the UIViewRepresentable
protocol, a built-in Markdown editor would be better.
Once again, we have a library for rendering Markdown in SwiftUI. You can set bold, italic, inline code, and a lot more. Here’s the syntax for it:
Markdown(
#"""
Make some words **bold** and other words *italic* with Markdown.
## Inline code
Wrap them in backticks: `var example = true`.
"""#
)

To customize the font, use the MarkdownStyle
view modifier with which you can set the title and code for the font name and size.
9. SlideOverCard
A card that pops up from the bottom of the screen is a design pattern that’s increasingly being adopted by iOS developers. That is no surprise since it is used by default in Apple’s HomeKit and Wifi-sharing UI.
SlideOverCard is a library that brings that card design to your SwiftUI interface. You can either use the SlideOverCardView
or the slideOverCard
view modifier with optional boolean parameters for accessory views such as displayExitButton
, dragEnabled
, and dragToDismiss
.

10. SwiftUICharts
Charts are a core component of most apps today. Besides providing eye-pleasing visuals, they’re useful in displaying data of stocks and cryptocurrencies as well as various statistical tools.
This library lets you quickly integrate line as well as vertical and horizontal bar charts in your SwiftUI apps. As icing on the cake, it supports accessibility too.

Conclusion
There’s a popular quote in programming: “Don’t reinvent the wheel, unless you plan on learning more about wheels.” That certainly applies to libraries.
When you’re building complex projects and are short on time, having ready-made libraries will certainly boost your development speed and ensure that you don’t waste hours on things that have already been addressed by someone else.
I hope this set of SwiftUI libraries inspires you to build more amazing iOS apps and perhaps contribute to open source projects.
That’s it for this one. Thanks for reading.