You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CapsuleButton(
// Text displayed on the button
title:"Button",
// Ratio of the button's height to the screen height (10% of screen height)
heightRatio:0.1,
// Background color of the button
backgroundColor:.r_Purple,
// Text color
textColor:.white,
// Font name used for the button title
//Please look at 'How to use custom font' below
font:"PottaOne-Regular",
// Furigana (small text above the main title, useful for Japanese reading aid)
furigana:"button",
// System icon name (e.g., SF Symbols)
iconName:"xmark",
// Color of the icon
iconColor:.white,
// Action to perform when the button is tapped
action:{print("Button Tapped!")})
How to use custom font
if you want to user custom font, please follow the steps below.
Add the font to your Xcode project
Drag and drop the font file (e.g., .ttf or .otf) into your Xcode project.
Update Info.plist
Open Info.plist and add a new key called Fonts provided by application (or UIAppFonts). Then add the file name of the font, including the extension (e.g., CustomFont.ttf).
Glass-style Rounded Rectangle View
iPhone 16 Plus
iPad Pro 13-inch
ZStack{GradientBackground(startColor:.g_Purple, endColor:.g_Orange)VStack{Spacer()RoundRectangleView(heightRatio:0.7){
//Add Any View
VStack{Image(systemName:"star.fill")Text("Add Any View")}}.padding()}}
About
This is the SwiftUI Package. You can easily incorporate Glassmorphism-style UI into your project with this packge.