Skip to content



Language: Swift 2, 3 and 4 Platform: iOS 8+ Carthage compatible CocoaPods compatible Build Status Join the chat at License: MIT Release version

Visual Layout Api

    |-email-| ~ 80,
    |-password-forgot-| ~ 80,
    |login| ~ 80,

Chainable Api
alignHorizontally(password, forgot)
equalWidths(email, password)

Equation-Based Api

email.Top == 100
password.CenterY == forgot.CenterY
login.Top >= password.Bottom + 20
login.Width == 75 % Width

All Generate native NSLayoutConstraints 🎉

Try it!

Stevia is part of freshOS iOS toolset. Try it in an example App ! Download Starter Project



Because nothing holds more truth than pure code 🤓
Xibs and storyboards are heavy, hard to maintain, hard to merge.
They split the view concept into 2 separate files making debugging a nightmare
There must be a better way


By creating a tool that makes Auto layout code finally readable by a human being.
By coupling it with live code injection such as injectionForXcode we can design views in real time
View layout becomes fun, concise, maintainable and dare I say, beautiful ❤️


  • [x] Pure Swift Auto Layout DSL.
  • [x] Simple: the apis are just NSLayoutConstraint shortcuts, pure UIKit code, no voodoo magic.

Advantages of Stevia

  • [x] Improves the readability of Auto Layout in code.
  • [x] Concise yet flexible apis.
  • [x] Type-Safe Visual Format language.
  • [x] Decribe Horizontal & vertical layout at the same time.
  • [x] Supports Live reload, for faster iteration cycles.
  • [x] Styling is more concise, reusable and can be composed.

Login View Example

In the project folder, you can find an example of a typical login view laid out in both native and Stevia for you to understand and compare the two approaches.

As a spoiler alert, the number of characters goes from 2380 to 1239 ( ~ divided by 2)

Write Half the code that is actually 10X more expressive and maintainable !


YannickDot, S4cha, Damien, Snowcraft, Mathieu-o

Swift Version

Swift 2 -> version 2.3.0
Swift 3 -> version 3.2.0
Swift 4 -> version 4.0.0


Like the project? Offer coffee or support us with a monthly donation and help us continue our activities :)


Become a sponsor and get your logo on our README on Github with a link to your site :)