Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
We provide the first Design Data Platform allowing you to send your design tokens and assets across your design system tools. Specify is built with this idea: configure once, synchronize anytime.
Specify is a central and tool-agnostic platform. It means you can integrate your daily applications to collect, store and distribute your design decisions to the right teams, in the right format, at the right time. To sum things up, see Specify as the synchronization layer for your design data at the heart of your design system.
Designers, connect your favorite design tool, like Figma, and let Specify monitor and collect your design tokens and assets automatically. This way, you control what is sent to developers and reduce the risk of inconsistencies.
Teams can benefit from a single source of truth and a continuous delivery system that ensures brand consistency.
In short, you have more time to focus on what matters most: your products and your end-users.
Welcome to the Specify docs! Learn about how to use and integrate Specify in your workflow to sync your design tokens and assets in your design system.
Specify is built on core concepts such as sources, destinations, pipelines, parsers. This page will help you understand all of them.
A Design API is an API designed to synchronize information in your design system. This includes design tokens, assets, components and documentation.
A source is a place that contains data you want to sync within your design system. Like a Figma file from which you sync your colors from. Or a GitHub repository containing your design tokens in JSON.
A destination is a place in which you distribute data in. Like a GitHub repository consuming colors coming from your design system or a Notion database in which you document your icons.
A pipeline is the route that connects a Source or a Destination to Specify. It helps you transform and synchronize data (e.g., design tokens) within your design system.
A repository is like a folder containing your design tokens and assets in Specify. Use repositories to store and organize your design data.
A Token type is a type of design token or asset supported by Specify like a colors, a text style or an icon. See all token types.
By default Specify returns design tokens and assets in JSON. Configure it to generate design data compatible with your company standards (e.g., CSS Variables).
A rule is a part of your configuration that helps you transform one or several Token types the way you want. Like a rule to pull colors from Specify as CSS Variables in a CSS file.
Parsers are functions allowing you to transform design tokens and assets coming from Specify to fit your needs and company standards. See all parsers.
In this guide, you’ll learn how to sync your Figma Variables and/or Styles to a Specify Repository and how to keep them updated.
To get the most out of this guide, you will need:
A Specify Account
A Figma file containing Variables and/or Styles
Access your Figma file which includes the Variables and/or Styles you would like to sync to Specify
Download ↗ the Specify Widget in the Figma file which includes your Variables and/or Styles. Or update the widget if you already have it. To update the Specify Widget you have to disconnect it, remove the entire frame in all of your Figma files, and reopen the latest version of the Widget.
Follow the steps in the widget to connect your account. You will need to create a personal access token and you will need to add the link to the Figma file to which the widget is added. Watch tutorial ↗
Click "Connect"
Choose Advanced Repository
Note: the widget can be used for syncing Figma Styles from the Classic repositories as well, you can switch between the two by clicking "Switch to".
Go to your Specify workspace
Click on "Create repository"
Choose a name
Select "Advanced Repository" (Learn more ↗︎)
Click "Create repository"
Go back to your Figma file that includes the Variables and/or Styles
Click on "Create Source" in the Specify Widget
It will show you the local collections and styles that are detected
Select the design tokens format you want to collect from your Figma file. Learn More ↗︎
Select the Specify repository you want to sync with. You should be able to see the Repository you have just created in Specify (if not, reload the list).
Click "Save to Specify"
You will immediately see the repository listed with the latest syncing time
Make sure to understand that only Advanced repositories are listed here.
Use the Sync
button to update your Variables and/or Styles with Specify. Now you are ready to export your design tokens! 🎉
You will see the category of design tokens that are synced on the left-hand side
In the Sources
section (left-hand menu), you will see your connection(s) and when the last sync between your Figma file and Specify repository has occurred.
Delete your source by clicking on the 3 dots option menu in the source card.
A 5min guide on collecting and pulling your first design tokens and assets with Specify.
In this guide you’ll learn how to pull your first design tokens and assets to CSS Custom Properties using the Specify CLI.
This guide helps you to sync tokens from Figma local styles and frames to Specify. Want to sync Figma Variables instead? Click here to learn more.
To get the most out of this guide, you’ll need:
A Specify account
A Specify repository containing some design tokens and assets (Learn more ↗)
Install @specifyapp/cli
via npm or Yarn.
Create a configuration file for your desired output format using one of our templates ↗️
Add your Specify repository
from which you want to pull your design tokens and assets. Learn more ↗.
Generate a personalAccessToken
for the CLI and add it in your configuration.
Our configuration is ready and we can now pull our design tokens and assets using the pull
command.
In this guide you’ll learn how to sync your design tokens from Tokens Studio to your Specify repository and how to keep them updated.
To get the most out of this guide, you will need:
Specify automatically fetches design tokens through the JSON file created by Tokens Studio. The best way to keep your design tokens in sync with both tools is to host your JSON file in a repository like GitHub.
Head to your Tokens Studio plugin in Figma
Within the settings tab, add a new sync provider
Commit your Tokens Studio JSON file to your repository
You can also manually export your file from Tokens Studio and upload it manually to your code repository. Click on Tools on the bottom left of the plugin and Export to file/folder. Be careful to tick all the boxes before exporting. We are not supporting multiple files at the moment.
Go to your Specify workspace
Click on "Create repository"
Choose "Advanced Repository"
Name your repository
Click on "Create repository"
In the "Source" tab, click on "Create a source"
Select "Remote URL"
At this point, you have two ways to sync your JSON file. Either with a public hosting link or a private one. We will go through both options below.
In the "Source" tab, click on "Create a source"
Select "Remote URL"
Select "Public"
Name your source
Paste your raw public URL of your JSON file
Select the format "Tokens Studio"
Let Specify check the connection
And voila!
Your JSON file is now detected as a source and your design tokens appear within your repository.
On the opposite of the public URL, Specify will ask you for some additional information so its system is able to fetch your file. Let’s see how to proceed with the main versioning tools:
Requirements:
Have a GitHub account
Have an Advanced Repository created
Have a JSON file containing design tokens from Tokens Studio
To add a private URL source from GitHub to Specify:
In the "Source" tab of your Specify repository, click on "Create a source"
Select "Remote URL"
Select "Private"
Name your source
Select "Tokens Studio Format"
Specify will test your JSON
And voila!
Requirements:
Have an Azure DevOps account
Have a Project containing a repository
Have a JSON file containing design tokens from Tokens Studio
To add a private URL source from Azure DevOps to Specify:
In the "Source" tab of your Specify repository, click on "Create a source"
Select "Remote URL"
Select "Private"
Name your source
Paste your Azure DevOps file URL such as https://dev.azure.com/{OrgName}/{ProjectName}/_apis/git/repositories/{RepositoryName}/items?path={FilePath}&api-version=7.0&includeContent=true
Select "Tokens Studio Format"
Specify will test your JSON
And voila!
Requirements:
Have a GitLab account
Have an Advanced Repository created
Have a JSON file containing design tokens from Tokens Studio
To add a private URL source from GitLab to Specify:
In the "Source" tab of your Specify repository, click on "Create a source"
Select "Remote URL"
Select "Private"
Give a name
to your source
Paste your GitLab file URL such as: https://gitlab.com/api/v4/projects/{OrgName}%2F{RepositoryName}/repository/files/{FilePath}?ref={branch}
Create an access token in GitLab: "Settings > Access Tokens". Select a role as Developer or Owner and select the scopes of read_api and read_repository.
In Specify, select Header
as auth system
Fill PRIVATE-TOKEN
in the key
field
Paste your GitLab project access token
Select "Tokens Studio Format"
Specify will test your JSON
And voila!
Requirements:
Have a JSONBin account
Have an Advanced Repository created
Have a bin with a JSON file containing design tokens from Tokens Studio
To add a private URL source from JSONBin to Specify:
In the "Source" tab of your Specify repository, click on "Create a source"
Select "Remote URL"
Select "Private"
Name your source
Paste your BIN private URL such as https://api.jsonbin.io/v3/b/{bin_id}
Select Header
as auth system
Following your choice, fill in the key
field either with X-MASTER-KEY
or X-ACCESS-KEY
Paste your key in the value
field
Select "Tokens Studio Format"
Specify will test your JSON
And voila!
After adding your source. All you have to do is to:
Go to the "Source" tab of your Specify repository
Click on the context menu next to your source
Click on "sync"
Your source is now updated!
Please keep in mind Specify is yet not compatible with the following data coming from Tokens Studio:
Composition
Assets (bitmap & vectors)
Color manipulation (gradients, alpha, darken, lighten & mix)
Learn more about how to query your SDTF token graph.
Your token system can be more complex than it seems. You will often need to interact with your token graph to transform a specific set of design tokens within a Specify configuration.
This article will help you understand how you can query your token graph to select a specific set of tokens.
You'll need to query your graph when using the following parsers:
Every Query holds a single a where property being an object, to select one branch of the graph, or an array of objects, to select many branches of the graph (OR statement).
The where
property splits in 3 kinds: token, group, collection - offering a dedicated set of options to match against the given kind.
The name
property accepts a RegExp for a value. These resources will help you debug your regular expressions:
Learn how to distribute your design tokens from Specify to your GitHub repositories via automated Pull Requests.
Specify will sync your GitHub repository if you have a config file .specifyrc.json
saved at the root of your GitHub repository.
Please make sure you have:
A GitHub account
A Specify account
One or multiple new Advanced Repositories Specify repositories containing some design tokens.
Want to connect a GitHub repository from your GitHub organization? Please make sure you have the correct access rights. Otherwise, you'll need an owner to approve your installation request.
Go to the applications catalog
Select GitHub
Click on "Connect"
Select the repositories you want Specify to have access to
You will now be able to connect your Specify and your GitHub repositories together 🎉
Once you've connected your GitHub account, Specify has to know what design tokens to synchronize and how.
Go to the Specify Advanced Repository you want to distribute design data from
Go to its "Destinations" page
Click on "Create Pipeline"
Select "GitHub application"
Select your GitHub account
Select the GitHub repository you want to distribute your design data to
Create the Pull Request containing your configuration file
Merge the PR created by Specify containing your configuration file
Specify will now automatically sync design data to your GitHub repository 🎉
In this guide you’ll learn how to transform design data coming from Figma Variables, Figma Styles and/or Tokens Studio into CSS Custom Properties using the Specify CLI.
Install the @specifyapp/cli
via npm or Yarn.
To create your Specify config file, you need to follow these steps:
Create an empty file named .specifyrc.json
Add the following content
A property version
is shown which refers to the new Advanced Repository from which we are extracting tokens. Use the version: "2"
.
Add your organization and repository name under the repository
property.
Run the command specify pull
to fetch your design tokens.
Specify exports your Figma Variables Modes as CSS data-attributes:
We would like to improve this output according to your needs as much as we can. Feel free to share your feedback with us via:
The in-app chat
Things to take into account when using the CLI
The configuration file can handle MJS, CJS, and JSON.
There is no more path
property in the parser settings, it is now replaced by an output
key inside every parser.
Parsers are functions allowing you to transform design tokens and assets coming from Specify to fit your needs and company standards.
Not familiar with parsers? Head over to the existing parsers documentation and learn more about why you need them and how to use them.
We're currently working on making compatible with the SDTF. We'll update this page accordingly.
You must set a name and your desired output for each parser:
The name
is the name of the parser
The output
property indicates which type of output you want the parser to produce
Parsers support none, some or more output types, please refer to dedicated parser pages for details.
Use case: the parser is expected to produce exactly one file.
Directory
Use case: the parser is expected to produce 0 to N files, all placed in the given directoryPath
.
Example with the to-css-custom-properties
parser:
A account
The plugin installed in your Figma
A , , , or account
Select "Sync from Figma Variables & Tokens Studio" ()
Create and Paste this GitHub file URL such as: https://api.github.com/repos/
/
/contents/
Select "Bearer Token" as the auth system & paste your personal access token from GitHub ( and be sure to check the repo section)
Select "Basic Auth" as auth system. Use your Azure DevOps email and a new Azure DevOps personal access token with Full Access or Code -> Read permissions.
Depending on your choice, you can use your master key
or an access key
. on JSONBin.
They will be released in future updates. However, if you have urgent needs for Specify to be compatible with one of them, .
Name for your configuration file ()
Get a personal access token .
Parser | Description | Usage example |
---|
This parser helps you generate Style Dictionary raw token files for all your design tokens coming from Specify.
Unlike the existing to-style-dictionary parser, this one doesn't have any options yet.
A collection will generate a folder at the top level
The default level refers to the SDTF Token Type associated SD Category → {collectionName?}
/{SDCategory}
The next folder level is the name of the potential first group containing the token → {collectionName?}
/{SDCategory}
/{1stLevelGroupName?}
The default filename is the name of the first group, or the name of the each mode the token might have, or base.json
→ {collectionName?}
/{SDCategory}
/{ mode? | 1stLevelGroupName? | base}.json
(priority order for filename: groupName
> mode
> base
)
The token path inside the file must match the token file path with the following priority order: collection
> SDCategoryType
> Mode
> Groups
{collectionName?}
/{SDCategory}
/{1stLevelGroupName? | mode? | base}.json
→ { collection: {type: {mode: { groupName: { tokenName: ... }}}}
This parser helps you change the case of names or modes over a SDTF graph. |
This parser helps you convert the color formats of color compatible tokens over a SDTF graph. |
This parser helps you filter a SDTF graph. |
This parser helps you select design tokens from specific mode(s). |
This parser helps you transform design tokens in CSS Custom Properties. |
This parser helps you get your design tokens as a SDTF graph in JSON. |
This parser helps you generate a Tailwind theme from all your design tokens coming from Specify. |
This parser helps you pull design tokens as JavaScript objects for all token types and their respective getter functions. |
This parser helps you pull design tokens in JSON with token values in JSON or CSS. |
This parser helps you pull design tokens as TypeScript objects for all token types and their respective getter functions. |
Here’s a 5 minute guide on how to use different features within the Advanced Repository based on the Specify Design Token Format.
Specify is building an entirely new Design Token Format (SDTF) to base our platform on a new design token graph. In short, this means that we are developing a format that enables more possibilities to add code-type sources and destinations than before. The new graph will facilitate managing a large number of design token types and assets. Next to this, it opens doors to more advanced features such as Aliases, Modes, and Collections.
In a more practical sense, the SDTF opens up compatibility with Figma Variables and Tokens Studio as a source alongside the existing Figma local styles compatibility. It also creates opportunities to create code output that includes aliases, modes, and collections.
All of these features come together in the Specify Advanced Repository.
This parser helps you transform design tokens into CSS Custom Properties.
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
A design token can have modes, be nested in groups and be part of a collection. The following use case will generate a single CSS file containing core tokens and semantic tokens.
Head towards our templates section to see how you can use this parser with others to suit a common use case when working with CSS.
This parser helps you select design tokens from specific mode(s).
This template is dedicated for Web developers using CSS. It helps you generate all types of design tokens as CSS Custom Properties in their respective CSS file.
This example uses four different parsers:
to target on a specific collection named "Colors" that contains our colors
to convert our colors in HSL
to change the name of our tokens and modes to kebabCase
to generate a CSS file containing our tokens
This template is an example among others. Head toward the page to get all available options.
When using the CLI, you need to fill three properties:
repository
is @organization/repository
personalAccessToken
which you can generate
rules
lets you transform tokens by chaining parsers
If you use the GitHub, you need to fill two properties:
repository
is @organization/repository
rules
lets you transform tokens by chaining parsers
This parser helps you filter a SDTF graph.
Parameter | Required | Type | Default | Description |
---|
We want to get all tokens in all groups named "info"
We also want to get the parent
collection...
... and all children
tokens within the "info" group(s)
We eventually generate our transformed SDTF graph in a JSON file thanks to the to-sdtf
parser.
This parser helps you change the case of names or modes over a SDTF graph.
This example helps you transform in kebabCase
the name all collections, groups, tokens and modes. Use this example if you want to generate CSS Custom properties with the to-css-custom-properties
parser.
We change the case of the token names
and the modes
to kebabCase
. We applyTo the collection level so we transform in kebabCase
:
the collection names
the group names
the token names
the mode names
This parser helps you generate raw token files for all your design tokens coming from Specify.
We then generate our transformed SDTF graph in a JSON file thanks to the parser.
Parameter | Required | Type | Default | Description |
---|
We then generate our transformed SDTF graph in a JSON file thanks to the parser.
Make sure you have connected your GitHub account with your Specify account. Head toward to learn more.
Parameter | Required | Type | Default | Description |
---|
We eventually generate our transformed SDTF graph in a JSON file thanks to the parser.
selectorTemplate
optional
string
The pattern used to generate the CSS selector name(s). It must match mustache template syntax.
You can use collection
, mode
and groups
names.
tokenNameTemplate
optional
string
The pattern used to generate token names. It must match mustache template syntax.
You can use collection
, mode
,groups
and token
names.
includeCoreTokensInScopes
optional
boolean
false
When set to true
, you will have both core tokens and alias tokens in each CSS scopes thus making alias tokens always resolvable.
| required |
| The query that select items in the graph. |
This template helps you generate your design tokens as a Tailwind theme.
This example uses the following parser:
to-tailwind to generate your design tokens as a Tailwind theme
If you use the CLI, you need to fill three properties:
repository
is @organization/repository
personalAccessToken
which you can generate in your account settings
rules
are where you provide parsers and compatible options
If you use the GitHub, you need to fill two properties:
repository
is @organization/repository
rules
lets you transform tokens by chaining parsers
Make sure you have connected your GitHub account with your Specify account. Head toward this article to learn more.
This template helps you pull your design tokens in the SDTF format in a JSON file.
This example uses the following parser:
to-sdtf to generate your design tokens in SDTF
If you use the CLI, you need to fill three properties:
repository
is @organization/repository
personalAccessToken
which you can generate in your account settings
rules
are where you provide parsers and compatible options
If you use the GitHub, you need to fill two properties:
repository
is @organization/repository
rules
lets you transform tokens by chaining parsers
Make sure you have connected your GitHub account with your Specify account. Head toward this article to learn more.
Types define every type of design token and asset Specify is compatible with. Use them to target specific types of design data you want to pull from Specify and manage with rules and parsers.
Types define every type of design token and asset Specify is compatible with. Use them to target specific types of design tokens and assets you want to pull from Specify.
In Specify, types are displayed as "categories" of design data you can create and find in your Specify repository.
Specify is compatible with the following design tokens and assets under the TokenType
type.
A border is a line surrounding a UI element. According to your target platform capabilities, you can define the border to go inside (inner border), outside (outer border), or between them (center).
Borders are considered as composite design tokens ↗ because they are composed of several design tokens.
Looking for border radius? You can add them as a Measurement type.
Colors have meaning and support the purpose of the content, communicating things like hierarchy of information, interactive states, and the difference between distinct elements in your UI. Among all your design token types, color is surely one of the most important ones.
The Depth token type sets a UI element's position on the z-axis. More commonly called z-index on Web ↗ and zIndex on Android ↗ and iOS ↗.
Represents the length of time in milliseconds an animation or animation cycle takes to complete, such as 200 milliseconds (cf DTCG ↗).
A gradient is the gradual blending from one color to another. It enables the designer to almost create a new color. It makes objects stand out by adding a new dimension to the design and adding realism to the object. In simple terms, gradients add depth.
Gradients are considered as composite design tokens ↗ because they are composed of several design tokens.
Measurement or Dimension ↗ design tokens help you define size values.
Common design tokens can be defined from this type:
internal margins
external margins
a spacing scale
a border width
a breakpoint
a font size
border radii...
Opacity design tokens help you set the opacity of UI elements.
Shadows help you communicate components elevation in your UIs. Popular variations and names include box-shadow, drop shadow, and many more.
Shadows are considered as composite design tokens ↗ because they are composed of several design tokens.
Text styles or typography helps your UI be usable. They create balance, hierarchy and structure for your content. Some say that "Web is 95% typography". To push this even further let's say UI are 95% typography. In other words, pay a great deal of attention to typography.
A text style is composed of several child design decisions that could be considered as single design tokens like:
a line-height
a font size
a letter spacing
a font name
Text styles are considered as composite design tokens ↗ because they are composed of several design tokens.
Bitmaps are raster images you can use in many contexts. They are basically any image you can display in a UI that is a .png
, .jpeg
, .webp
, .avif
...
Fonts are files containing typefaces used by your text styles.
In Specify, all font files are stored as .ttf files by default. You can pull and convert them on the fly thanks to the convert-font ↗ parser.
By "vectors" we mean vector images (e.g., SVG and PDF files). You can use them for 2 main purposes: iconography and illustration. In the following section we will only focus on icons.
Icons act a visual aids to help users complete tasks. We advise you to have an harmonic set of icons you can use to draw attention to specific actions.
| required |
| optional |
| optional |
| required |
| optional |
| required |
|
| optional |
|
| Whether to resolve the aliases of the graph. Thus, preventing aliases to become unresolvable when their source is not included in the selected items. |
| optional |
|
| Whether to allow unresolvable aliases to flow through.
This option is only available when |
| optional |
|
| When you target tokens from different areas in your graph you can end up with tokens that will have the same name which will lead to an override. When set to |
| optional |
|
| By default, this parser mutates your graph. When set to |
| optional |
| Change the names or the modes of the selected items. |
| required |
| required |
Automatically distribute your design tokens and assets according to your organization's standards with our ready-to-use configuration templates.
This section will help you get started with ready-to-use configuration template. Each configuration file will be filled by one or several rules, called parsers.
Parsers are functions allowing you to transform design tokens and assets coming from Specify to fit your needs and company standards.
Make sure to read the Configuration section to better understand how configuration file works with Specify.
Template | Description |
---|---|
Learn how to use the Specify Playground to iterate more easily on your configuration files
The Specify Playground helps you run parsers against a token graph and see the generated output in live. It's a great tool to help you iterate on your configuration files or try new parsers on the go.
https://iframe.specifyapp.com/sdtf-playground/index.html
The left side panel contains the SDTF graph you'll run your rules against. It's editable and you're free to use your own SDTF graph which you can get with the to-sdtf parser.
The middle panel contain your Specify configuration rule.
The right side panel displays the generated code
The Specify API lets you extend Specify functionalities beyond what we provide out of the box.
New to Specify? Head over to the existing REST API documentation to learn more about why it can be useful for your team and how to use it.
Specify provides the following endpoint to help you get design tokens and assets from a Specify repository.
https://api.specifyapp.com/v2/{workspace}/repository/{repository}/execute-rule
POST
https://api.specifyapp.com/v2/{workspace}/repository/{repository}/execute-rule
Get design tokens and assets from a Specify repository. You can only execute a single rule with this endpoint.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Once you have your personal access token, you can pass it within the Authorization
header of your request.
Here's a simple example to get tokens in JSON from a repository called all-design-data
in the @acme-inc
workspace:
Learn how to distribute your design tokens and assets from Specify to your GitHub repositories via automated Pull Request.
By default, Specify can only syncs your GitHub repository if you have a config file .specifyrc.json
at the root of your GitHub repository. If you want to sync design tokens from several Specify repositories you need to run the Specify CLI inside a GitHub Action.
Please make sure you have:
A GitHub account
A Specify account
A Specify repository containing some design tokens and/or assets
Want to connect a GitHub repository from your GitHub organization? Please make sure you have the correct access rights. Otherwise, you'll need an owner to approve your installation request.
Go to the applications catalog on the Destinations page
Select GitHub
Click on "Connect"
Select the repositories you want Specify to have access to
You will now be able to connect your Specify and your GitHub repositories together 🎉
Once you've connected your GitHub account, Specify has to know what design tokens to synchronize and how.
Go to the Specify repository page you want to distribute design data from
Go to its "Destinations" page
Click on "Create Pipeline"
Select "GitHub application"
Select your GitHub account
Select the GitHub repository you want to distribute your design data to
Select your configuration template (Learn more)
Create the Pull Request containing your configuration file
Merge the PR created by Specify containing your configuration file
Specify will now automatically sync design data to your GitHub repository 🎉
Have trouble getting Pull Requests in your GitHub repository? Learn more about how to fix the most common issues.
Parsers are functions allowing you to transform design tokens and assets coming from Specify to fit your needs and company standards.
By default, without any parsers, Specify will return your design data as raw data:
Design tokens are returned in JSON
Assets are returned as files
There are high chances you need to transform those design data to fit your needs. Parsers help you do just that.
Parsers are functions allowing you to transform design tokens and assets coming from Specify to fit your needs and company standards.
A parser does the following job:
Receives design data as input
Transforms this design data
Returns the transformed data
The data returned by a parser can either be:
Design data that can be used by another parser coming next in your transformation pipeline
A file so it can be used by people, frameworks, or scripts
Parsers are what make Specify powerful and flexible. They help you be in total control of the design data you pull from Specify.
Parsers are ordered and takes specific input to generate specific output. This way, we can easily test the input coming from the previous parser to check if the whole parsers process will work.
Parsers are classified in 2 categories: technology and utility.
Technology parsers help you transform your design tokens to specific technologies and formats (CSS Custom properties, SCSS, Tailwind, a Javascript theme object compatible with React Native...)
Some examples:
Utility parsers take care of "smaller" transformation. Like converting a pixel value to rem
or transforming a string to kebabcase.
Some examples:
All parsers are open source and available on the following GitHub repository.
Learn how to automatically document your design tokens and assets from Specify to your Notion workspace.
Use our Notion integration to:
Document your brand guidelines
Create public pages for press and brand kits
Automate the maintenance of your design system documentation
Please make sure you have:
A Notion account
A Specify account
A Specify repository containing some design tokens and/or assets
Want to connect a Notion page from your Notion workspace? Please make sure you have the correct access rights. Otherwise, you'll need for an owner to approve your installation request.
color
measurement
textStyle
bitmap
font
vector
The Specify CLI helps you pull design tokens and assets from Specify right from your terminal.
Use the Specify CLI to integrate Specify in your workflow.
You can use the Specify CLI to:
Pull your design tokens in the right format using parsers
Test your configuration before using it in a GitHub repository
Sync a Specify repository
Install @specifyapp/cli
via npm or Yarn.
Pull design tokens and assets from your Specify repository.
Sync a Specify repository to update its design tokens and assets.
Flags are parameters you can pass while launching the command. All of these parameters are optional if you use a config file.
Relative path to your Specify config file.
The name of the Specify repository you want to pull your design tokens and assets from.
The Specify Personal Access Token used to authenticate your actions.
Rules Specify will follow to generate design tokens and assets in your desired output format.
Execute command without actually writing files. Use this flag to test the output of a configuration without generating files.
Learn how to distribute your design tokens and assets from Specify as npm or GitHub packages.
This integration helps you generate design tokens and assets as private or public packages in a npm or a GitHub registry.
Choose npm if you already have a private npm registry, we suggest you distribute your npm packages there. It will prevent you from creating a public npm package that will take an unnecessary public namespace.
Choose GitHub if you want to keep your packages private to your GitHub organization without paying for an npm team account.
Choose a custom registry if your company uses its own registry. If you have specific security constraints like IP whitelisting or custom authentication.
Please make sure you have:
An npm account, a GitHub account, or access to a custom registry
A Specify account
A Specify repository containing some design tokens and/or assets
Go to your Specify repository you want to distribute your design tokens from
Go to the "Destinations" page and click on "Create pipeline"
Select "npm packages"
Configure your package name, access type (public / private), and module type (Common JS / ES Modules)
Your Specify personal access token should always be private. We highly recommend you to set it in a private variable or in a .env
variable.
Set your personal access token as an environment variable and interpolate it in the CLI wit .
You can use this method to sync Specify with git repositories in , , or .
List of all apps you can use with Specify to sync, read and transform your design tokens and assets.
The Specify API lets you extend Specify functionalities beyond what we provide out of the box.
The Specify API is based on REST structure. We support authentication via access tokens. Requests are made via HTTP endpoints with clear functions and appropriate response codes. Endpoints allow you to request design tokens and assets from a Specify repository.
However, you cannot directly generate files using the REST API as it only returns text. You'll have to write custom scripts to generate design files (e.g., colors.css
).
Specify provides the following endpoint to help you get design tokens and assets from a Specify repository.
https://api.specifyapp.com/repository/{workspace}/{repository}/design-tokens
POST
https://api.specifyapp.com/repository/{workspace}/{repository}/design-tokens
Get design tokens and assets from a Specify repository.
Once you have your personal access token, you can pass it within the Authorization
header of your request.
Here's a simple example to get colors in CSS variables from a repository called all-design-data
in the @acme-inc
workspace:
Specify uses standard HTTP response codes for success and failure notifications. Our errors are further classified by type. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted). Codes in the 5xx range indicate an error with Specify servers.
Some 4xx errors that could be handled programmatically include an error code that briefly explains the error reported.
Learn more about how to configure Specify to generate design tokens and assets fitting your company standards.
By default, without any , Specify returns your design data as raw data:
Design tokens are returned in JSON
Assets are returned as files
A configuration file helps you:
request design tokens and assets from a Specify repository
transform them to fit your company standards thanks to rules, token types and parsers.
A configuration is composed of 3 main properties:
repository
personalAccessToken
rules
The name of the Specify repository
you want to pull your design tokens and assets from.
Let's say we have the following repository in Specify called "all-design-data" located in the "@acme-inc" organization.
We target it like this:
You can only target one repository per configuration file. Want to pull design tokens from several Specify repositories? Create a several configuration files and run them with the Specify CLI.
The Specify personalAccessToken
used to authenticate your actions.
Rules help you transform your design tokens and assets the way you want.
A rule is composed of the following properties:
Parsers are functions allowing you to transform design tokens and assets coming from Specify to fit your needs and company standards.
Inside a configuration, a parser has the following properties:
Here's a rule named "Design Tokens" that:
targets color
and measurement
design tokens
sorts them alphabetically by their name
transforms them as CSS Custom Properties
writes them in a design-tokens.css
file inside a styles
folder
The following examples are made to be used with the Specify CLI.
Requirements:
a Specify repository containing design tokens
Run all examples by copying the code and running the specify pull
command.
Here's a basic configuration file that targets a Specify repository called all-design-data
from the @acme-inc
organization:
This example config file will return a design-tokens.json
file containing all design tokens and assets stored in the all-design-data
repository.
Here's an example of a token value returned by Specify:
Now let's update our previous configuration to only pull colors and transform them as CSS Custom Properties in HSL.
Here is the input returned by Specify and the output generated by Specify after executing our configuration.
The target color format to convert to. Actual value conversion is done by the package.
The selection where to apply the transformation.
collection
, group
, token
take a Regex string or true
to select anything of the kind.
An SDTFQuery
can be used for advance use cases. Learn more about .
The target color format to convert to. Actual value conversion is done by the package.
The selection where to apply the transformation.
collection
, group
, token
take a Regex string or true
to select anything of the kind.
An SDTFQuery
can be used for advance use cases. Learn more about .
The query that select items in the graph. Learn more about .
The case transformation to apply. Actual transform is done by the package.
The selection where to apply the transformation.
collection
, group
, token
take a Regex string or true
to select anything of the kind.
An SDTFQuery
can be used for advance use cases. Learn more about .
Parser | Description | Usage Example |
---|---|---|
You can sync the following in Notion:
Initialize a Specify configuration tailored for a specific output format. .
Need a personal access token?
Also, , so make sure your package needs to be public before making it as is 👍
Select your existing npm app, or create a new one by setting your or personal access token, then set your registry
Set your Specify configuration file. If you host your config file on an external service like JSONBIN make sure to make your BIN public (). Also, your config only needs the property.
Specify's REST API is useful if you want to use design data coming from Specify through custom scripts like a Figma plugin or a .
In short, our REST API helps you request design data through HTTP requests. Like with our you can use parsers to transform design data.
To sum things up, to generate files from Specify (e.g., colors.css
or icon.svg
) containing design tokens or assets use the or our .
Name | Type | Description |
---|
Name | Type | Description |
---|
Property | Type | Description |
---|
Need a personal access token?
You can have as many rules
as you want and you can have rules that transform several at once.
Name | Type | Required | Description |
---|
Name | Type | Required | Description |
---|
a valid personal access token ()
This template is dedicated for Web developers using CSS. It helps you generate all types of design tokens as CSS Custom Properties in their respective CSS file.
This template helps you pull your design tokens in the SDTF format in a JSON file.
This template helps you generate your design tokens as a Tailwind theme.
workspace*
String
The name of your organization in Specify. For instance, in this URL https://specifyapp.com/ @specifyapp/Seeds
the workspace is "@specifyapp".
name
String
The name of the Specify repository containing the design data you're requesting. For instance, in this URL https://specifyapp.com / @specifyapp/Seeds
the repository is "Seeds".
parsers*
Object or Array
Can contain an object or an array of objects. Each object corresponds to a specific parser.
name*
The name of your rule
Apply camelcase function on specific keys from a design token.
Convert font in several formats.
Filter tokens and assets by their name using a regular expression.
Replace all the stroke
and fill
attribute raw color value by its corresponding design token as a CSS variable. If no design token match, the raw value will be left as is.
Apply kebabcase function on specific keys from a design token.
Have design tokens referencing other ones.
Set a structured filename on your assets. It won't rename your asset but only add a new filename
property on the asset object. The filename structure uses mustache as a template engine.
Omit keys from a design token not given in parameters.
Apply pascalcase function on specific keys from a design token.
Get only specific keys from a design token given in params.
Concatenate two strings.
Convert the value of a measurement design token from pixel to rem.
Replace any string matched by a regex by a new string.
Round any measurement design token with specific precision.
Apply snakecase function on specific keys from a design token.
Loop on several design tokens and sort them according to their respective key values.
Concatenate two strings.
Wrap SVG files within a JSX component.
Optimize vectors using svgo.
Transform design tokens in CSS Custom Properties.
Create CSS @font-face
rules to import your font files.
Create text styles as CSS classes.
Create a Design System Package (DSP).
Format design tokens to create a theme compatible with the Flutter specification.
Transform design tokens in JSS.
Transform design tokens to a JavaScript theme
object compatible with React Native.
Generate .scss
files containing Scss map and function / mixin to access the values of the tokens.
Create text styles formatted as SCSS mixins.
Transform design tokens in SCSS variables.
Generate Style Dictionary configuration files for all your design tokens coming from Specify.
Format design tokens to create a theme compatible with the TailwindCSS specification.
Format design tokens to create a theme compatible with the theme-ui specification.
Format design tokens to create their corresponding TypeScript types.
workspace* | String | The name of your organization in Specify. For instance, in this URL |
name* | String | The name of the Specify repository containing the design data you're requesting. For instance, in this URL |
|
| The type of error returned. One of |
|
| For some errors that could be handled programmatically, a short string indicating the error code reported. |
|
| A human-readable message providing more details about the error. |
|
| All invalid query / payload parameters. All invalid query / payload parameters. This property will be displayed on specific endpoints error response. |
filter | Object |
|
parsers | Object or Array |
|
|
| The name of your rule. |
|
|
| The path in your project where you want Specify to generate your design data. |
|
|
|
|
|
|
|
|
|
| The options relative to the parser you apply. Each parser has its own options you can find in their respective README file. |
Learn to get and use your design tokens and assets right from Raycast.
Our Raycast extension helps you search your design tokens and assets and use them in your favorite tools: Notion pages, Pitch presentations, Slack discussions, etc.
Please make sure you have:
Raycast installed
A Specify account
A Specify repository containing some design tokens and/or assets
Generated a Personal Access Token for Raycast
Need a personal access token? Generate one ↗
You can sync the following Token types in Raycast:
color
bitmap
vector
Install the Specify Raycast extension from the Raycast store
Set your newly created Personal Access Token in Raycast
Are you looking for a specific color from your design system? Open Raycast and type in Search Colors
.
The main action is to copy the hexadecimal value of your color. You can also access other actions like copying the value in RGBA or the name of the color by accessing the action menu via Cmd + K
.
Are you looking for a .jpg
or .png
file, such as a logo or photo of a team member? As with the previous search, open Raycast and type in Search Bitmaps
.
Are you looking for a .svg
file, such as a logo or an icon? Just open Raycast and type in Search Vectors
.
Set all the you want to target.
Can contain an object or an array of objects. Each object corresponds to a specific .
If you want to pull , or token types you must set a directory ().
The list of you want your rule to target.
The parsers you want to apply to transform your . For further details see .
The name of the parser. Choose from .