Skip to content

Guide · Open source

How to use Material: install the Swift iOS UI framework

Updated · written with AI from the project's own documentation and checked against our catalogue data

Material is an open-source UI/UX framework for building iOS apps in Swift, with ready-made components styled after Google's Material Design look. This guide shows how to install it with CocoaPods or Carthage, what components it includes, and where it may not be the right choice for a new project. By the end you will know how to add the library to an Xcode project and which components to start with.

MaterialCosmicMind/Material · ★ 12k · MIT

Quick start

  1. 1Check the requirements. Confirm you have Xcode and an iOS deployment target of 8.0 or higher. Choose CocoaPods or Carthage as your dependency manager.
  2. 2Install CocoaPods. Run gem install cocoapods in your terminal to install the CocoaPods tool.
  3. 3Add Material to your Podfile. Add pod 'Material', '~> 3.1.0' to the Podfile, with platform :ios set to 8.0 and use_frameworks! included.
  4. 4Run pod install. Run pod install in the project folder and open the generated workspace in Xcode.
  5. 5Open a sample project. Use the linked Samples repository to see how components such as Cards or the NavigationDrawer are built in code.
  6. 6Build and test. Build the app and check the components on the iOS version you support.

What Material is and who it suits

Material is a UI/UX framework for creating applications on iOS. It provides interface components such as cards, text fields, navigation drawers, toolbars, and floating action menus. Its animations and transitions are handled by the separate Motion library.

It is best suited to iOS developers who want Material Design-style components without building them from scratch, and to developers maintaining existing Swift projects that already use Material. It is iOS-only, so Android and cross-platform projects need a different tool.

  • iOS developers wanting Material-style components
  • Maintainers of existing Swift projects that already use Material
  • Projects that need cards, text fields or navigation drawers

What you need before you install Material

You need Xcode and a dependency manager. The README describes CocoaPods and Carthage as the two options. The README lists iOS 8.0+ and Xcode 8.0+ as requirements, and Swift 4.0+ in its badges.

  • Xcode
  • CocoaPods or Carthage
  • Deployment target of iOS 8.0 or higher

Install Material with CocoaPods

CocoaPods is a dependency manager for Cocoa projects. Install it first with the gem command. Then add Material to your Podfile and run pod install.

The README's example Podfile sets the source, platform iOS 8.0 and use_frameworks!, and adds the Material pod pinned to the ~> 3.1.0 version constraint.

  • Install CocoaPods, then add pod 'Material', '~> 3.1.0' to your Podfile
  • Run pod install from the project folder
$ gem install cocoapods $ pod install

Install Material with Carthage

Carthage builds your dependencies and provides binary frameworks. The README says you can install Carthage with Homebrew. Add Material to your Cartfile, then run carthage update to build the framework.

After building, drag the built Material.framework into your Xcode project.

  • Install Carthage with Homebrew
  • Add the Material GitHub repository to your Cartfile
  • Run carthage update and drag Material.framework into Xcode
$ brew update $ brew install carthage github "CosmicMind/Material"

Explore the main components

Material includes a set of components such as Cards, TextField, Button, Switch, FABMenu, Toolbar, SearchBar, Tabs, NavigationController, NavigationDrawer and Snackbar. The README links a sample project for each one, which is the quickest way to see working code.

A Card can be configured with a Toolbar, Bar and content area that may use any UIView type. A NavigationDrawer slides in from the left or right and holds your app's navigation destinations.

  • Cards, ImageCard and PresenterCard
  • TextField with placeholder and hint details
  • NavigationDrawer and NavigationController
  • Toolbar, SearchBar and Tabs
  • FABMenu and Snackbar

Check whether Material fits your project

The README's last push was in May 2022, and it lists iOS 8.0+ and Swift 4.0+. Because of this age, teams starting a new app today should weigh alternatives carefully. The README does not mention SwiftUI support, so do not assume it works in SwiftUI projects.

Material is not a fit for Android or cross-platform work. Comparable projects named for iOS include Material Components for iOS, SnapKit and Motion.

  • Good fit: maintaining an existing Swift project that already uses Material
  • Weigh alternatives: starting a new iOS app
  • Not a fit: Android or cross-platform projects, or SwiftUI-only work

What people use it for

  • Adding Material-style cards to a list-based iOS app
  • Building a navigation drawer that slides in from the left or right
  • Creating text fields with placeholder and hint text
  • Maintaining an older Swift app that already depends on Material

Frequently asked questions

Is Material free to use?

Material is released under the MIT licence, as shown in the project's license badge and README. Check the LICENSE.md file in the repository for the full terms before using it in a product.

How do I install Material?

Install CocoaPods with gem install cocoapods, add pod 'Material', '~> 3.1.0' to your Podfile, and run pod install. Carthage is the other option, using a Cartfile entry and carthage update.

What are the requirements for Material?

The README lists iOS 8.0+ and Xcode 8.0+ as requirements, and Swift 4.0+ in its badges. Embedded frameworks need a minimum deployment target of iOS 8.

Does Material support SwiftUI?

The README does not mention SwiftUI support. Confirm this in the repository before starting a SwiftUI project.

Can I use Material for Android?

No. Material is an iOS-only framework written in Swift. Android and cross-platform projects need a different library.

What are alternatives to Material?

The README's comparable projects include Material Components for iOS, SnapKit and Motion. Motion is used by Material for animations and transitions, while Material Components for iOS is an alternative for Material Design-style UI.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Material suits iOS developers who maintain an existing Swift project using it, or who need its cards, text fields or navigation drawer. Teams starting a new iOS app, SwiftUI projects, and anyone building for Android or cross-platform should look at other options.

Install options & downloads