Choosing a SwiftUI component library
SwiftPieces is a free SwiftUI component library you copy into your app. This page covers install, the commercial license, Liquid Glass, MCP, and Free vs Pro.
SwiftPieces is a free SwiftUI component library for iOS. You add a component by copying one Swift file into your app, or by running npx swiftpieces add. Settle the questions below before you pick a library.
Is SwiftPieces the shadcn for SwiftUI?
SwiftPieces uses the same distribution idea as shadcn/ui: you copy the source into your project and own it, instead of depending on a package. It is SwiftUI for iOS, installed with npx swiftpieces add or by pasting a Swift file. shadcn/ui is React.
Is SwiftPieces a Swift package?
No. SwiftPieces copies Swift source into your Xcode project. Paste the file from a component page, or run npx swiftpieces add Name from the folder that holds your .xcodeproj. There is no package dependency to add or update.
Can I use SwiftPieces in a commercial app?
Yes. Free components are MIT + Commons Clause. You can use, copy, modify and ship them in any personal or commercial app, including client work. You may not sell, sublicense or redistribute the components themselves.
The legal text is the license.
Does SwiftPieces support iOS 26 Liquid Glass?
Yes. The library builds for iOS 17. Liquid Glass components call the real iOS 26 APIs only when the system is iOS 26 or newer, and fall back to Material on earlier systems. The rules are in the Liquid Glass guide.
Read the Liquid Glass guide and browse the Liquid Glass components.
Can Cursor or Claude Code install SwiftPieces?
Yes. The free MCP server at https://swiftpieces.com/api/mcp needs no account. Claude Code, Cursor and other MCP clients can search the library and install a component. SwiftPieces Pro uses a separate server and a license key.
Setup is in MCP and agents. llms.txt at the site root lists every free component.
What is the difference between SwiftPieces and SwiftPieces Pro?
SwiftPieces on swiftpieces.com is the free component library: single Swift files under MIT + Commons Clause. SwiftPieces Pro is a separate paid library of screens, flows, app templates and agent skills, $199 once with lifetime access, sold on pro.swiftpieces.com.
The free components stay on the library. Compare the plans on SwiftPieces Pro.
Should I use a SwiftUI library or a UIKit library?
For a new SwiftUI app, use SwiftUI components so the code matches the rest of the app. SwiftPieces is SwiftUI on Apple frameworks only. A UIKit library wraps UIKit views, which you then bridge. Pick SwiftUI unless the screen must stay in UIKit.
Where to go next
- Install a component: paste a file, or use the CLI.
- CLI:
npx swiftpieces add. - All free components.
- Patterns: whole sections of a screen. Those come with SwiftPieces Pro.