Specify Docs
Specify ↗︎Changelog ↗︎Guide ↗︎
V2
V2
  • Getting started
    • Introduction
    • What is Specify?
    • Pulling your first tokens with the CLI
    • Glossary
  • Collect
    • What is a Source?
    • Available sources
      • Figma Variables & Styles
      • Tokens Studio
  • Distribute
    • What is a Destination?
    • Available destinations
      • GitHub
      • Specify CLI
      • Specify SDK
      • HTTP API
  • Concepts
    • Overview
    • Parsers Engine
    • SDTF Client
      • SDTF Engine
    • Specify Design Token Format
  • Guides
    • Configuration file 101
    • Specify CLI usage 101
      • Getting started
      • Authentication
      • Generate Files
    • Specify SDK usage 101
      • Getting started
      • Retrieving and working with the tokens
      • Updating tokens
      • Converting a token to XXX
      • Executing generation parsers
    • Specify SDK Cheatsheet
    • Manage font files
    • Querying a SDTF graph
  • Reference
    • Parsers Engine
    • Parsers
      • change-case
      • convert-color
      • convert-dimension
      • make-line-height-relative
      • filter
      • register-view
      • select-modes
      • prefix-by
      • suffix-by
      • replace-string
      • to-css-custom-properties
      • to-css-text-style
      • to-css-font-import
      • to-flutter
      • to-javascript
      • to-json
      • to-json-list
      • to-kotlin
      • to-react-native
      • to-scss-mixin-text-style
      • to-scss-map
      • to-sdtf
      • to-style-dictionary
      • to-swift
      • to-tailwind
      • to-typescript
      • svgo
      • svg-to-jsx
      • svg-to-tsx
      • to-svg-file
      • to-bitmap-file
      • to-file
    • Specify SDK
      • SpecifyClient
      • SDTFClient
      • Converters
        • CSS
      • ParsersEngineResults
    • SDTF Engine
      • Query API
      • Mutation API
      • SDTF Query Language
      • SDTF QueryResult
      • TokenState
        • Stateful Value
    • HTTP API
      • POST /parsers-engine-rpc
    • Specify CLI
  • Resources
    • Parser Rules templates
      • CSS Custom Properties
      • Tailwind
      • React Native
      • Flutter
      • SDTF
      • JSON
    • Specify CLI VS Specify SDK
    • Playground
    • Best practices
  • Useful links
    • Discord
    • YouTube
    • Twitter
    • Help Center
    • Canny
Powered by GitBook
On this page
  • Utility parsers
  • Generation parsers

Was this helpful?

Export as PDF
  1. Reference

Parsers

Parsers API reference

PreviousParsers EngineNextchange-case

Last updated 1 year ago

Was this helpful?

Utility parsers

Utility parsers help you mutate your token tree before generating final outputs.

Utility parsers do not have the output option since they mutate the internal state without producing any actual output.

Parser
Description
Usage example

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 convert units of dimension tokens (spacing, sizing, breakpoint, blur...) and composite tokens sub values (font-size, letter-spacing, border-width...).

This parser helps you transform your text style lineheight values relative to their font size.

This parser helps you filter a SDTF graph.

This parser helps you register a SDTF view that can be later used by generation parser to allow for partial outputs of the token tree with no destructive mutations.

This parser helps you select design tokens from specific mode(s).

This parser helps you prefix the name of your collections, groups and tokens from your SDTF token tree.

This parser helps you suffix the name of your collections, groups and tokens from your SDTF token tree.

This parser helps you replace a part or the whole name of your collections, groups and tokens from your SDTF token tree.

Generation parsers

Generation parsers help you generate your token tree into any technology / purposed oriented outputs.

Many generation parsers can be placed in the same , as long as they all need the same transformed - or not - token tree and they all use the file or directory output setting.

Parser
Description
Usage example

This parser helps you transform design tokens in CSS Custom Properties.

This parser helps you generate text styles as CSS classes.

This parser helps you create CSS @font-face rules to import your font files.

This parser helps you generate a Flutter 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 in JSON within an iterable array structure.

This parser helps you generate design tokens for Kotlin.

This parser helps you pull design tokens as a theme compatible with React Native and their respective helper functions.

This parser helps you generate text styles as SCSS mixins.

This parser helps you generate .scss files for each token type containing SCSS map and function / mixin to access the values of the tokens.

This parser helps you get your design tokens as a SDTF graph in JSON.

This parser helps you generate design tokens as Swift classes.

This parser helps you generate a Tailwind theme from all your design tokens coming from Specify.

This parser helps you pull design tokens as TypeScript objects for all token types and their respective getter functions.

This parser helps you generate JSX or TSX components from your vector assets.

This parser helps you generate TSX components from your vector assets.

This parser helps you generate SVG files from your vector assets.

This parser helps you generate PNG and JPG files from your bitmap assets.

This parser helps you generate files from any asset token: Bitmap, Font and Vector.

This parser helps you generate raw token files for all your design tokens coming from Specify.

This parser help you optimize and transform your SVG strings with .

change-case
convert-color
convert-dimension
make-line-height-relative
filter
register-view
select-modes
prefix-by
suffix-by
replace-string
to-css-custom-properties
to-css-text-style
to-css-font-import
to-flutter
to-javascript
to-json
to-json-list
to-kotlin
to-react-native
to-scss-mixin-text-style
to-scss-map
to-sdtf
to-style-dictionary
Style Dictionary
to-swift
to-tailwind
to-typescript
svgo
svgo
svg-to-jsx
svg-to-tsx
to-svg-file
to-bitmap-file
to-file
parser rule
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example