Git Product home page Git Product logo

aplica-design-tokens's Introduction

Design Tokens Generator with Tokens Studio & Style Dictionary

Design Tokens

Overview

This project aims to streamline the creation and management of design tokens using the Tokens Studio plugin for Figma, in conjunction with Style Dictionary. By leveraging these tools, we automate the process of generating, organizing, and distributing design tokens across different platforms.

What are Design Tokens?

Design tokens are the visual design atoms of the design system โ€” specifically, they are named entities that store visual design attributes. These can include colors, typography, spacing, and more. They are used to ensure consistent design language across various platforms and products.

Why Tokens Studio & Style Dictionary?

  • Tokens Studio allows for easy creation and management of design tokens directly within Figma, which is great for designers.
  • Style Dictionary takes these tokens and transforms them into formats suitable for development, making it easier to apply consistent styles in different programming environments.

Features

  • Automated Token Generation: Create design tokens directly from Figma using the Tokens Studio plugin.
  • Cross-Platform Support: Transform tokens into multiple formats (JSON, SCSS, XML, etc.) using Style Dictionary.
  • Consistency & Scalability: Maintain a single source of truth for design tokens that can be applied consistently across all platforms.
  • Customizable & Extendable: Tailor the token generation process to fit your specific project needs and easily extend it with additional functionality.

Getting Started

Follow these steps to set up and use the Design Tokens Generator:

Prerequisites

  • Node.js (version 12 or higher)
  • A Figma account with access to the Tokens Studio plugin
  • A GitHub repository to store your project

Installation

  1. Clone the repository:

    git clone https://github.com/bellentani/aplica-design-tokens.git
    cd design-tokens-generator
  2. Install dependencies:

    npm install

Using Tokens Studio

  1. Setup Tokens Studio in Figma:

    • Open your Figma project.
    • Open the Tokens Studio plugin.
    • Setupe tokens within Figma using the plugin.
  2. Export Tokens:

    • Export your tokens from Tokens Studio in a JSON format.

Integrating with Style Dictionary

  1. Place your JSON tokens:

    • Save the exported JSON file in the tokens directory within your project.
  2. Configure Style Dictionary:

    • Open config.json and customize it according to your token categories and desired output formats.
  3. Build the tokens:

    • Run the following command to generate the tokens in the specified formats:
      npm run build

Project Structure

  • tokens/: Contains the exported token files from Tokens Studio.
  • build/: The output directory where generated tokens will be saved.
  • config.json: The configuration file for Style Dictionary.
  • scripts/: Custom scripts to enhance the token generation process.
  • README.md: Project documentation.

Usage

Command Line Interface

You can run various commands to generate and manage your tokens:

  • npm run build: Generate tokens based on the configuration.
  • npm run clean: Clean the build directory.

Customizing Output Formats

Edit the config.json file to specify how and where the tokens should be output. You can define multiple formats and destinations to suit different platform requirements.

Contributing

We welcome contributions! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Thanks to the teams at Tokens Studio and Style Dictionary for providing such powerful tools.
  • Inspired by design systems and token management best practices.

Contact

For questions or support, please open an issue on this repository or reach out via email.


Feel free to customize the content as per your specific project details and requirements.

aplica-design-tokens's People

Contributors

bellentani avatar fucazu avatar

Watchers

 avatar

aplica-design-tokens's Issues

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.