OSS TanbouSign in with GitHub

A Swift DSL for expressing Auto Layout constraints in readable code

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
20,346
Primary language
Swift
License
MIT
Repository last updated
Jul 13, 2026
On this page

Overview

SnapKit is a library for writing Auto Layout constraints on iOS, macOS, and tvOS through a chained Swift API. After adding a view, developers can group width, height, centering, and related constraints inside snp.makeConstraints.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Group constraints in a Swift DSL

Expressions such as make.width.height.equalTo(50) and make.center.equalTo(view) describe layout relationships without assembling NSLayoutConstraint calls individually. The API covers making, updating, and remaking constraints in code-driven interfaces.

Sources: [1]

Best fit

Use it in code-built Apple platform interfaces

The library can be added through Swift Package Manager and targets iOS 14+, macOS 12+, and tvOS 14+. It fits projects that build view hierarchies programmatically and keep constraints close to the view code.

Sources: [1][2]

Before adoption

Confirm Xcode and platform requirements

The 6.0.0 README requires Xcode 26 or later and a Swift 6 toolchain. Local package tests can run on macOS, but demonstrating an iOS or tvOS interface still requires an appropriate Xcode project and Simulator or device.

Sources: [1][2][3]

Official sources

  1. [1]SnapKit 6.0.0 README(2026-10-04)
  2. [2]SnapKit 6.0.0 Package.swift(2026-10-04)
  3. [3]SnapKit 6.0.0 release(2026-10-04)
Supplemental curator note

SnapKit fits interfaces whose constraints live in code rather than storyboards. Compare its OS minimums and Xcode 26 with Swift 6 toolchain requirement against the project before adoption.

Try it in 3 steps

  1. 1

    Clone release 6.0.0

    Run in a terminal with Xcode 26 or later selected. If several versions are installed, set DEVELOPER_DIR for this session before cloning the reviewed release.

    git clone --branch 6.0.0 --depth 1 https://github.com/SnapKit/SnapKit.git snapkit-demo
  2. 2

    Inspect the Swift package targets

    Read Package.swift on macOS and list the SnapKit library and test targets.

    cd snapkit-demo && swift package describe
  3. 3

    Run the package tests

    Build and test with the selected Xcode 26+ macOS Swift toolchain. Validate iOS or tvOS UI behavior separately in an Xcode Simulator or on a device.

    swift test
Check the official README

Growth

Growth trends · Last 30 days

20,346 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
0
Open PRs
9

Development activity is still being collected.

Built with

Categories and tags

Categories

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • auto
  • autolayout
  • snapkit
  • swift
  • xcode
  • dsl
  • cocoapods
  • constraints
  • layout
  • ui
Stars
20,346
Forks
2,045
Watchers
388
Open issues
1
Contributors
80
Owner type
Organization
Primary language
Swift
License
MIT
Repository last updated
Jul 13, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?