# SnapKit/SnapKit

A Swift Autolayout DSL for iOS & OS X

Repository: https://github.com/SnapKit/SnapKit
Canonical: https://ross.abutalabs.com/products/snapkit
Homepage: https://snapkit.github.io/SnapKit/
Language: Swift
License: MIT
License Family: permissive
Topics: auto, autolayout, snapkit, swift, xcode, dsl, cocoapods, constraints, layout, ui
Last push: 2026-07-13T10:50:19+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 92, release rhythm 54, longevity 100
- inputs: {"age_days": 4472, "days_push": 51, "days_rel": 94, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 20345, forks 2042 (observed 2026-08-28T04:11:29.988041+00:00)

## What it is
SnapKit is a Swift DSL that makes Auto Layout constraint creation simple and expressive on iOS, macOS, and tvOS. It provides a type-safe, chainable syntax for building layout constraints with minimal code.

## Use cases
- lay out UIKit views programmatically without Interface Builder
- define Auto Layout constraints with concise readable Swift code
- center and size views relative to their superview
- replace verbose NSLayoutConstraint boilerplate in view controllers
- build responsive iOS layouts in code

## When to choose
- you build UIKit views programmatically and want readable constraint code
- you want a mature, widely adopted Swift layout DSL with MIT licensing
- you need type-safe constraints that catch errors at compile time

## When to avoid
- you use SwiftUI exclusively and don't need UIKit Auto Layout
- you prefer building all layouts in Interface Builder or storyboards
- your project targets platforms below iOS 14 / macOS 12

## Facets
- artifact type: library
- maturity: stable
- function: ui-components, developer-tools
- domain: mobile-development, cross-platform, developer-tools
- platform: -
- tags: autolayout, dsl, constraints, layout, cocoapods, swift-package-manager, uikit, ios, macos, swift, mobile

## Member repositories
- SnapKit/SnapKit (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:29.988041+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:59:02.115509+00:00, confidence not recorded.
  - readme: https://github.com/SnapKit/SnapKit (fetched 2026-08-28T04:11:29.988041+00:00, sha 353e65073603)
  - homepage: https://snapkit.github.io/SnapKit/ (fetched 2026-08-29T07:57:33.402045+00:00, sha 1ded41130216)
- Data as of 2026-08-30T08:39:29.467469+00:00.
