Giter Site home page Giter Site logo

sushant-j / figma-tokens Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tokens-studio/figma-plugin

0.0 0.0 0.0 8.04 MB

Official repository of the plugin 'Figma Tokens' for Figma.

Home Page: https://www.figma.com/community/plugin/843461159747178978

License: MIT License

Shell 0.03% JavaScript 4.50% TypeScript 93.94% CSS 1.53% HTML 0.01%

figma-tokens's Introduction

Figma Tokens

installs likes

Figma Design Tokens - Making design tokens a single source of truth for Figma. | Product Hunt

Figma Tokens is a plugin for Figma allowing you to define and use design tokens in Figma. You can store your design tokens in JSON, sync them with a sync provider such as GitHub and define tokens even for properties that have no native support yet in Figma, such as borderRadius or spacing. You can create color and typography tokens in a granular way by extracting atomic decisions to tokens. You can also define aliases for every token, so that you can reuse your decisions. You can define and apply spacing tokens, allowing you to set the Auto Layout properties in Figma automatically. Think of it like Styles for everything.

Documentation

https://docs.tokens.studio/

Roadmap

https://github.com/users/six7/projects/4/views/4

Slack Channel

There's a Slack channel where the community can exchange ideas, best practices or simply ask a question. Want to join? Let me know by sending me a DM on twitter and I'll send you the invite.

Sponsors

Zed Logo Mirahi Logo
zed.dev Mirahi

Is your company using Figma Tokens? Consider sponsoring the project so we can spend time and resources on it!

How should I use this plugin?

There's 2 ways how you could use the plugin: Only use it to create or update your Styles but not apply any tokens with it, which would allow you to use features such as atomic type decisions, aliases and theme sets for managing styles (this is really powerful in combination with Figma's Swap library feature). Or you could use the plugin to apply tokens with it, which would give you style-like functionality for things like border radius or spacings.

It's up to you what method you choose. If you choose the option to keep using Styles then the plugin will only serve as a method to update them, but you would still be using Figma Styles for apply color and text styles.

How does applying border radius or spacing tokens work?

Whenever you apply a token to a layer, the plugin will store hidden information on that layer containing information about what token to apply for what property. Whenever your tokens change, we scan the document for any layers containing these hidden information, and update layers accordingly. For Styles, the plugin checks if there is any local style with the same name of your color or typography tokens and updates these. For files where the local styles is remote (not local to that document) the plugin has no way to apply the style currently and will apply the raw hex value. I would advise to apply styles with Figma's Style feature, not with the plugin due to exactly this reason. The plugin can still serve as a manager for styles then, allowing you to use a single source of truth.

More information

Most information can be found in the docs, but you can also go to my personal website to find some more details about my work. jansix.at/resources/figma-tokens

Contribute

  • Run yarn to install dependencies.
  • Run yarn build:watch to start webpack in watch mode.
  • Open Figma -> Plugins -> Development -> New Plugin... and choose manifest.json file from this repo.
  • Create a Pull Request for your branch

Known Issues

Cannot read property document of undefined

This error can be solved by clearing Figma's cache; follow the steps outlined in this document.

Mac
Use the Terminal app to clear the cache.

Quit the Figma desktop app.
Open the Terminal.app and enter the following command: rm -rf "$HOME/Library/Application Support/Figma/"{Desktop,DesktopProfile}
Try opening the Figma desktop app again.

figma-tokens's People

Contributors

benhami1ton avatar borbit avatar dependabot[bot] avatar edwardirby avatar ishavgula-tactill avatar jakobe avatar jdwillemse avatar jeffreydelooff avatar jhajduk-sage avatar liammartens avatar marcellopaiva avatar mh4gf avatar mightydevknight avatar mpaiva avatar nemzes avatar pat270 avatar robinhoodie0823 avatar roppazvan avatar scttdavs avatar six7 avatar srinivas0210 avatar swordedge avatar theemattoliver avatar tpict avatar wardme avatar zephraph avatar zslabs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.