# SnapKit/Masonry

Harness the power of AutoLayout NSLayoutConstraints with a simplified, chainable and expressive syntax. Supports iOS and OSX Auto Layout

Repository: https://github.com/SnapKit/Masonry
Canonical: https://ross.abutalabs.com/products/masonry
Language: Objective-C
License: MIT
License Family: permissive
Last push: 2023-04-13T18:23:56+00:00

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

## Adoption (not part of the score)
Stars 18131, forks 3150 (observed 2026-08-28T04:11:26.347277+00:00)

## What it is
Masonry is a lightweight Objective-C framework that wraps Apple's Auto Layout NSLayoutConstraints in a chainable, expressive DSL. It simplifies creating constraints in code for iOS and macOS apps, with Swift users directed to its successor SnapKit.

## Use cases
- create autolayout constraints in objective-c without verbose nslayoutconstraint code
- lay out uiviews programmatically with a chainable syntax
- pin a view to its superview edges with insets
- replace storyboard constraints with code-based layout
- maintain legacy objective-c ios app layouts

## When to choose
- you are writing an Objective-C iOS or macOS app and want concise Auto Layout code
- you are maintaining an existing codebase that already uses Masonry
- you prefer a lightweight DSL over verbose NSLayoutConstraint APIs

## When to avoid
- you are writing Swift - use SnapKit instead for better type safety
- your project relies primarily on Interface Builder or SwiftUI for layout
- you need a library with active feature development rather than maintenance

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, developer-tools
- domain: mobile-development, cross-platform, developer-tools
- platform: -
- tags: auto-layout, objective-c, dsl, constraints, cocoapods, ios, macos, swift

## Member repositories
- SnapKit/Masonry (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:26.347277+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-29T17:02:09.151147+00:00, confidence not recorded.
  - readme: https://github.com/SnapKit/Masonry (fetched 2026-08-28T04:11:26.347277+00:00, sha bc647bba6cb3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
