All Projects β†’ Yelp β†’ salsa

Yelp / salsa

Licence: MIT license
A tool for exporting iOS components into Sketch πŸ“±πŸ’Ž

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to salsa

Sync.sketchplugin
Keep your design team in sync!
Stars: ✭ 357 (+475.81%)
Mutual labels:  design-systems, sketch, design-tools
Html Sketchapp Cli
Quickly generate Sketch libraries from HTML documents and living style guides, powered by html-sketchapp
Stars: ✭ 631 (+917.74%)
Mutual labels:  design-systems, sketch, design-tools
Prism
Gett's Design System code generator. Use Zeplin Styleguides as your R&D's Single Source of Truth.
Stars: ✭ 308 (+396.77%)
Mutual labels:  design-systems, design-tools
Story2sketch
Convert Storybook into Sketch symbols πŸ’Ž
Stars: ✭ 391 (+530.65%)
Mutual labels:  design-systems, sketch
Awesome Design Tools
The best design tools and plugins for everything πŸ‘‰
Stars: ✭ 23,754 (+38212.9%)
Mutual labels:  design-systems, design-tools
sketch wireframing kit
Quick Sketchapp wireframing tool for UK government digital services
Stars: ✭ 74 (+19.35%)
Mutual labels:  design-systems, sketch
design-tokens-plugin
Support end of life! Delivering consistent Design System. A Sketch plugin that exports Design Tokens to JSON format. You can export colors, typography, icons and utilis. A must-have tool for design system project.
Stars: ✭ 100 (+61.29%)
Mutual labels:  design-systems, sketch
Figma Html
Convert Figma designs to HTML, React, Vue, Angular, and more!
Stars: ✭ 382 (+516.13%)
Mutual labels:  design-systems, design-tools
Design Systems
A Sketch app plugin that help you find out popular design systems and download official Sketch UI kit.
Stars: ✭ 83 (+33.87%)
Mutual labels:  design-systems, sketch
React Color Tools
A set of tools as React components for working with colors 🎨
Stars: ✭ 87 (+40.32%)
Mutual labels:  design-systems, design-tools
Tachyons Verbose
Functional CSS for humans. Verbose edition.
Stars: ✭ 102 (+64.52%)
Mutual labels:  design-systems, design-tools
Sketchsheets
Free ready to print sketch sheet templates for UX designers
Stars: ✭ 241 (+288.71%)
Mutual labels:  sketch, design-tools
Paddy Sketch Plugin
Automated padding, spacing and alignment for your Sketch layers
Stars: ✭ 2,219 (+3479.03%)
Mutual labels:  sketch, design-tools
plasmic
Visual page builder and web design tool for any website or web app tech stack
Stars: ✭ 1,475 (+2279.03%)
Mutual labels:  design-systems, design-tools
Move To Library Sketchplugin
You can now move symbol from your project to any library and re-attach all the symbol instances to this library. also it keep the overrides without any problems and it work with abstract that have libraries not in your local machine
Stars: ✭ 174 (+180.65%)
Mutual labels:  sketch, design-tools
Data Populator
A plugin for Sketch and Adobe XD to populate your design mockups with meaningful data. Goodbye Lorem Ipsum. Hello JSON.
Stars: ✭ 1,665 (+2585.48%)
Mutual labels:  sketch, design-tools
6spiral Sketch Plugin
Sketch plugin to draw Spiral and Helix shapes.
Stars: ✭ 72 (+16.13%)
Mutual labels:  sketch, design-tools
Kitchen
Powerful sketch plugin for design cooperation 🍳🍳🍳
Stars: ✭ 103 (+66.13%)
Mutual labels:  sketch, design-tools
Tachyons
Functional css for humans
Stars: ✭ 11,057 (+17733.87%)
Mutual labels:  design-systems, design-tools
Style Dictionary
A build system for creating cross-platform styles.
Stars: ✭ 2,097 (+3282.26%)
Mutual labels:  design-systems, design-tools

Carthage compatible CocoaPods Compatible

What is Salsa?

Salsa is an open source library that renders iOS views and exports them into a Sketch file. We built Salsa to help bridge the gap between design and engineering in an effort to create a single source of truth for visual styling of UI.

How it works

Running Salsa inside of an iOS simulator will output two things into a specified directory: a .salsa file and an images folder. You can then pass these two inputs into the salsa command line tool to compile them into a .sketch file.

Why two steps?

Certain macOS-only APIs need to be used to encode text for .sketch files. Having two steps allows us to define our own intermediate file format that’s easier to work with than the full sketch file format. This means we can leverage this file format in the future if we want to expand this tool for other platforms.

Installing Salsa

Cocoapods

pod 'Salsa'

Carthage

github 'Yelp/salsa'

Homebrew

brew tap yelp/salsa
brew install salsa

Using Salsa

import Salsa
Converting a view to a Sketch Group
// Configure the export directory
SalsaConfig.exportDirectory = "/some_directory"

// Convert a view into a group
let myGroup = myView.makeSketchGroup()
Putting a group into a sketch document and exporting to a salsa file
// Create a page containing the generated group, and insert it into a Document
let document = Document(pages: [Page(layers: [myGroup])])

// Export the document to disk
try? document.export(fileName: "my_file")
Converting a salsa file to a sketch file

In your terminal of choice run the following:

$ salsa -f /some_directory/my_file.salsa -e /some_directory/my_file.sketch

Creating a Sketch file documenting your standard UI elements

We provide some helpers to help you document your elements out of the box. You organize examples of your views into an Artboard by conforming your view class to ArtboardRepresentable.

extension View1: ArtboardRepresentable {
  static func artboardElements() -> [[ArtboardElement]] {
    ...
  }
}

If you would like to also create Symbols of your views to go along with the generated Artboards you can instead conform your views to SymbolRepresentable.

extension View2: SymbolRepresentable {
  static func artboardElements() -> [[ArtboardElement]] {
    ...
  }
}

Create your Artboards and Symbols from these ArtboardRepresentable and SymbolRepresentable views

// Configure the export directory
SalsaConfig.exportDirectory = "/some_directory"

// Generate the artboards and symbols
let artboardsAndSymbols = makeArtboardsAndSymbols(from: [[View1.self], [View2.self]])

// Put the artboards and symbols onto their own dedicated pages
let artboardPage = Page(name: "Artboards", layers: artboardsAndSymbols.artboards)
let symbolPage = Page(name: "Symbols", layers: artboardsAndSymbols.symbols)

// Create a document with the generated pages and export it
let document = Document(pages: [artboardPage, symbolPage])
try? document.export(fileName: "my_file")

Example Project

Check out the Example project to see how Sasla can be used in production. The Example app uses a test target to generate Sketch files without manually launching Xcode.

To generate a Sketch file for the Example project run the following after cloning the repo:

cd Example
pod install
./generate_sketch

This should create a new file called ExampleSketch.sketch inside the project directory

Open up generate_sketch with a text editor to see how this is done.

Documentation

For a full breakdown of the Salsa API check out the docs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].