Specify Docs
Specify ↗︎Changelog ↗︎Guide ↗︎
V1
V1
  • Getting started
    • Introduction
    • What is Specify?
    • Getting started
    • Glossary
  • Advanced Repository
    • Getting started
    • Figma Variables & Styles
    • Tokens Studio
    • CLI & Config
    • Querying a SDTF graph
    • GitHub
    • Parsers
      • to-css-custom-properties
      • to-style-dictionary
      • to-tailwind
      • to-sdtf
      • to-javascript
      • to-react-native
      • to-json
      • to-typescript
      • filter
      • select-modes
      • change-case
      • convert-color
      • convert-dimension
    • Templates
      • CSS Custom Properties
      • SDTF
      • Tailwind
    • REST API
    • Playground
  • Concepts
    • Token types
    • Configuration
    • Parsers
    • Templates
    • Best practices
  • Apps & Tools
    • Overview
    • GitHub
    • npm
    • GitLab
    • Bitbucket
    • Azure DevOps
    • REST API
    • CLI
    • Notion
    • Raycast
  • Useful links
    • Discord
    • YouTube
    • Twitter
    • Help Center
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Advanced Repository
  2. Templates

Tailwind

This template helps you generate your design tokens as a Tailwind theme.

PreviousSDTFNextREST API

Last updated 1 year ago

Was this helpful?

This example uses the following parser:

  • 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

  • rules are where you provide parsers and compatible options

{
  "version": "2",
  "repository": "@organization/repository",
  // Only use the personalAccessToken when working with the CLI
  "personalAccessToken": "<your-personal-access-token>",
  "rules": [
    {
      "name": "Generate tokens as a Tailwind theme",
      "parsers": [
        {
          "name": "to-tailwind",
          "output": {
            "type": "file",
            "filePath": "theme.js"
          }
        }
      ]
    }
  ]
}

If you use the GitHub, you need to fill two properties:

  • repository is @organization/repository

  • rules lets you transform tokens by chaining parsers

{
  "version": "2",
  "repository": "@organization/repository",
  "rules": [
    {
      "name": "Generate tokens as a Tailwind theme",
      "parsers": [
        {
          "name": "to-tailwind",
          "output": {
            "type": "file",
            "filePath": "theme.js"
          }
        }
      ]
    }
  ]
}

Make sure you have connected your GitHub account with your Specify account. Head toward to learn more.

to-tailwind
in your account settings
this article