whatisgithub

What is matrix-swift?

mana-am/matrix-swift — explained in plain English

Analysis updated 2026-05-18

146SwiftAudience · developerComplexity · 1/5Setup · easy

In one sentence

Matrix Swift is a SwiftUI package with over 100 animated dot-grid loading indicators, ported from a JavaScript library, with no assets or dependencies.

Mindmap

mindmap
  root((Matrix Swift))
    What it does
      Animated dot loaders
      100 plus styles
      Deterministic selection
      Reduce Motion support
    Tech stack
      Swift
      SwiftUI
      SwiftPM
    Use cases
      Chat thinking indicator
      Custom loading spinner
      Loader gallery browsing
    Audience
      iOS developers
      SwiftUI developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Show an animated thinking indicator while an AI chat feature waits for a response.

USE CASE 2

Replace a plain spinner with a more distinctive loading animation in an iOS app.

USE CASE 3

Let users or developers pick from a gallery of over 100 loader styles.

USE CASE 4

Add an accessible loading animation that automatically respects Reduce Motion settings.

What is it built with?

SwiftSwiftUISwift Package Manager

How does it compare?

mana-am/matrix-swifteeliberto/surgerelay-macosjcranokc/app-monitor
Stars146150151
LanguageSwiftSwiftSwift
Setup difficultyeasymoderateeasy
Complexity1/53/52/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Add the package via Swift Package Manager in Xcode, no external dependencies needed.

The explanation does not state the specific license terms, only that attribution to the original project must be kept.

So what is it?

Matrix is a Swift package that adds animated loading indicators to SwiftUI apps. Instead of a plain spinning circle, it draws small animated grids of dots in over one hundred different patterns, such as squares, circles, hexagons, triangles, and playful shapes like a heart or sparkle. It is a Swift port of an existing JavaScript library called matrix, and it was built to power the chat thinking animation in an iOS app called Mana. The package is meant for anyone building an iOS app in SwiftUI who wants a loading indicator that feels more crafted than a generic spinner, for example to show that an AI chat is thinking, that a tool is running, or as a small inline spinner elsewhere in an app. A key feature is that the loader choice is deterministic: giving it the same identifying key always produces the same loader, so the animation does not appear to randomly change every time SwiftUI redraws the view, which can happen while scrolling. Developers add it to a project through Xcode's package manager or by adding one line to their Package.swift file. Once installed, each loader is its own SwiftUI view, so a developer can drop in a named component directly, for example a specific square or hexagon loader with a chosen size, color, and speed, or use a single generic view and pass in a loader identifier, which is handy for pickers or picking one at random. The package also ships a built in interactive gallery view so a developer can browse every available loader inside their own app. Under the hood, every loader is pure SwiftUI: animated circles arranged in a small grid, with no image assets and no external dependencies. The animations respect the Reduce Motion accessibility setting, pausing and showing a static version automatically for users who have that setting turned on. The project is published with the original author's permission and asks that attribution and a link back to the source project be kept. It requires Swift 5.9 or newer and iOS 18 or newer, and it is maintained by Mana, an AI focused iOS creation studio.

Copy-paste prompts

Prompt 1
Show me how to add the Matrix Swift package to my Xcode project's Package.swift.
Prompt 2
Give me example SwiftUI code using a few different Matrix loaders like DotmSquare3 and DotmHex1.
Prompt 3
How do I use MatrixLoader with a loader id instead of a named component?
Prompt 4
Explain how Matrix Swift keeps loader selection deterministic across view rebuilds.

Frequently asked questions

What is matrix-swift?

Matrix Swift is a SwiftUI package with over 100 animated dot-grid loading indicators, ported from a JavaScript library, with no assets or dependencies.

What language is matrix-swift written in?

Mainly Swift. The stack also includes Swift, SwiftUI, Swift Package Manager.

What license does matrix-swift use?

The explanation does not state the specific license terms, only that attribution to the original project must be kept.

How hard is matrix-swift to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is matrix-swift for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.