Sketch 100 — Everything new in 3 minutes. Learn more

Skip Navigation

Sharing Libraries

Last updated on 06 Dec 2023
2 min read

Sharing Libraries via your Workspace is by far the simplest way to make sure everybody uses the right components in their designs. However, you can also use a sync service or even upload a Library to a server and use RSS for updates.

Sharing a Library

Watch lesson

Sharing via your Workspace

In the web app, find the document you want to use as a Library, hover over its thumbnail, click the Three dots and select Settings. Select (Set As) Library, then click Done.

In the Mac app, you’ll find all Workspace Libraries for any team you belong to. From the Menu Bar, select Sketch > Settings > Libraries. Scroll to find the Libraries you need and enable them via the checkbox.

Sharing via a sync service

You can also use a sync service like Dropbox or Google Drive to upload a Library and share it with other people. Anyone you share your Library with will need to add the document as a Library in the Mac app via Sketch > Settings > Libraries. They will get a notification in the Mac app any time you update it.

Hosting a Library on a server

You’ll first need to host your Library document on a server, then create a JSON file that looks like this:

{
  "versionID" : "0.5.1",
  "downloadURL" : "https://my.server.com/TemplateLibrary.sketch",
  "downloadFileSize" : 68487516,
  "creationDate" : "Wed, Mar 17 2022 14:00:00 +0000",
  "itemName" : "Template Library",
  "imageURL" : "https://my.server.com/TemplateLibrary.png"
}

Save the JSON, making sure you add the .json file extension to the filename. For the example above we have named it TemplateLibraryUpdate.json.

In the JSON file, edit the following fields as necessary using the dictionary keys and values below as a reference.

Important: Your JSON file, Library document, and thumbnail image must be served via https.

Use a tool like the Meyerweb URL encoder to encode your JSON file URL and append it to the Sketch app link as in the following:

sketch://add-library?url=https%3A%2F%2Fmy.server.com%2FTemplateLibraryUpdate.json

The two parts of the example above are the Sketch app link to add a Library, sketch://add-library?url=, and the encoded Library document URL: https%3A%2F%2Fmy.server.com%2FTemplateLibraryUpdate.json

To verify that everything’s working, enter the full URL (from sketch:// through to the end your encoded URL) into your browser. Sketch should now launch and add your Library.

Dictionary keys and values

  • itemName string: the Library’s display name. If it wasn’t provided, the final path component of the downloadURL with the file extension removed will be used instead. Not required
  • versionID string: a unique version identifier Required
  • downloadURL string: a URL as a string pointing to the Library document to download. Required
  • downloadFileSize integer: the file size in bytes of the Library document described by downloadURL. Required
  • creationDate string: a date as a string (conforming to the RFC822 date and time text format) describing when the Library version was created. Not required
  • imageURL string: a URL as a string pointing to an image file that you can use to represent the Library in the Sketch UI until it’s downloaded and installed. Not required

Note: The versionID value doesn’t check whether one Library is newer than another. Sketch considers an update to be available if this value differs to the one that’s stored locally by Sketch.