-
Notifications
You must be signed in to change notification settings - Fork 5
Component Documentation
PartyUI is a simple Swift-based package, where most components are meant for SwiftUI. These components have been designed to support iOS 16.0+ or later, and have been optimized to support iOS 16-18 (non-Solarium devices), and iOS 26+ (liquid glass). These components are decently customizable and are easy-to-use!
Most of these buttons contain the following properties: color, shape (AnyShape), and useFullWidth. These buttons also have a particular style when they are disabled.
-
PrimaryButtonStyle: A large button with a opaque background. -
TranslucentButtonStyle: A large button with a transparent background, which is usually used for buttons that emphasize a detail in a view (such as social links). -
GetButtonStyle: A small button with a transparent background, which is good for lists where you want to have a button inside of a cell next to a label of some type. -
FancyButtonStyle: A large button that uses eitherultraThinMaterialorglassEffectdepending on the OS version. Great for buttons that are used in overlays or are meant for navigation.
This text field contains the following properties: shape (AnyShape) and useFullWidth. This text field also has a particular style when it is disabled.
-
TextFieldBackground (ViewModifier): A background that's good for a text field that is not contained inside of a platter. -
TextFieldButton(View, textField: View, button: View): A backgrounded text field with a customizable button inside of it.
All four labels have the following properties: text and icon (String, name for SF Symbol/Image)
-
ButtonLabel(useImage: Bool): A label that's meant for usage in the following buttons:PrimaryButtonStyle,TranslucentButtonStyle, andFancyButtonStyle. -
HeaderLabel: A label that's good forListviews. -
HeaderDropdown(isExpanded: Bool, useItemCount: Bool): A dropdown for a section in aListthat keeps track of the collapsed state in AppStorage. -
NavigationLabel(footer: Text, showChevron: Bool): A label that's good for a cell that allows you to navigate somewhere.
These toggles are insanely customizable! They have the following properties: text, icon, infoType (.info, .warning), infoTitle, infoMessage, minSupportedVersion (Double), maxSupportedVersion (Double), isOn (Binding<Bool>).
-
SectionPlatter (ViewModifier): A platter that's good for a view that doesn't already have one. This can contain multiple elements into one section. -
PlainToggle: A plain toggle that's good forListviews. -
PlatterToggle(color: Color): A toggle with it's own background.
-
TerminalHeader(text: String, icon: String, color: Color, context: String): A header for a terminal section. -
TerminalPlatter (ViewModifier): The background to a terminal. This is optimized for the LogsView() we usually use in our apps. -
TinyInfoPlatter (ViewModifier): The background to a small piece of info that lives right under the terminal platter in a section.
-
CompactAlert(title: String, icon: String, text: String, color: Color): An alert with its own background. -
PlainAlert(title: String, icon: String, text: String, color: Color): A plain alert that is good for plainListviews. -
InfoBadge(text: String, icon: String, color: Color): A small, colorful badge that has a capsule shape. -
AppIcon(image: Image): A decently-sized view that can be used to display an app icon.
-
OverlayBackground(stickBottomPadding: Bool): A background that has a specific padding and progressive blur for anything that uses stuff such as `safeAreaInset(edge: .bottom). Use stickBottomPadding on sheets for only iPads. -
cornerRad.component: A CGFloat that's good for most medium-sized components. -
cornerRad.platter: A CGFloat that's good for most large-sized components. -
EdgeInsets(.sectionInsets): A custom EdgeInset forListviews that use the.plainstyle. -
Animation(.iconUpdate): An animation that's good for an icon that changes from one to another.
-
AppInfoCell(build: String): A cell that displays the app icon, app version, and build. These items are grabbed from the app itself, other than the build, which you can set yourself. -
LinkCreditCell(image: Image, name: String, description: String, url: String): A cell that allows you to credit a developer.
-
LicenseView(): A view that loads licenses from inside of the app. Add licenses inside of the app's bundle, and name them like so: [License Name]_[License Type].
-
Alertinator: A function that uses UIKit to present alerts nicely. UseAlertinator.shared.type.alert(title: String, body: String, showCancel: Bool = true)alert(title: String, body: String, showCancel: Bool = true, actionLabel: String = "OK", action: @escaping () -> Void)prompt(title: String, placeholder: String, showCancel: Bool = true, completion: @escaping (String?) async -> Void)
-
Exitinator: Nicely exit the app. -
Shareinator: Allows you to show the share sheet for a file stored at a url. UsepresentShareSheet(with: URL). -
Hapticinator: Plays a haptic when ran. UseHaptic.shared.play(type, intensity:CGFloat).soft.medium.heavy