There are a few different ways to share a Library with others — using a sync service, sharing via your Workspace, or uploading to a server and using RSS for updates.
Via your Workspace Sharing and discovering Libraries is simple. Upload your document to your Workspace, click the three dots icon and select Document Settings…. Check Use as Library in the What can they do? section, then click Save Changes.
Head back to the Mac app and you’ll find all the Workspace Libraries for any team you belong to under the Libraries tab in Settings. Scroll through and find the Libraries you need, and enable them using the checkbox.
Using a sync service (like Dropbox or Google Drive) to share your Library is as simple as uploading the Sketch document and sharing it with the people that need it. Anyone you share your Library with will need to add the document as a Library in the Mac app. They will get a notification in the Mac app any time you update it.
Hosting a Library on a server to share your Library is a little more complicated. First you need to host your Library document on a server, then create a JSON file like this:
{
"versionID" : "0.5.1",
"downloadURL" : "https://my.server.com/TemplateLibrary.sketch",
"downloadFileSize" : 68487516,
"creationDate" : "Wed, Mar 22 2022 14:00:00 +0000",
"itemName" : "Template Library",
"imageURL" : "https://my.server.com/TemplateLibrary.png"
}
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%2FTemplateLibrary.sketch
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%2FTemplateLibrary.sketch
To verify that everything’s working, enter the full URL (from sketch://
through to the end your encoded URL) into your browser. Sketch should launch and add your Library successfully.
Dictionary Keys and Values
itemName
string: the Library’s display name. If it isn’t provided, the final path component of thedownloadURL
with the file extension removed will be used. Not requiredversionID
string: a unique version identifier. RequireddownloadURL
string: a URL as a string pointing to the Library document to download. RequireddownloadFileSize
integer: the file size in bytes of the Library document described bydownloadURL
. Not requiredcreationDate
string: a date as a string, conforming to the RFC822 date and time text format, describing the date the Library version was created. Not requiredimageURL
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 is not compared in a way that considers whether one Library version is newer than another. Sketch considers an update to be available if this value differs to the one that’s stored locally by Sketch.