# Material Tokens
Material Design now supports the [Design System Package (DSP)](https://github.com/AdobeXD/design-system-package-dsp) for importing and exporting [Material Design Tokens](http://m3.material.io/foundations/design-tokens/overview) within the [Material Theme Builder](http://material.io/material-theme-builder). DSP can be used in designer and developer workflow tools and Material Component libraries. Let’s dive into how you can use Material Tokens (DSP) within the [VSCode extension](https://marketplace.visualstudio.com/items?itemName=Adobe.xd) to generate code.
## Getting Started
Make sure you have the latest version of VSCode installed on your machine. VSCode is free to download and is open source.
[Download VSCode](https://code.visualstudio.com/)
After VSCode is installed, navigate to the marketplace on the extensions tab and search for Adobe.

[Download Adobe XD VSCode extension](https://marketplace.visualstudio.com/items?itemName=Adobe.xd)
Click on install and you may have to reopen or reload VSCode. After the extension is successfully installed, you can open Adobe XD by searching for Adobe in the command palette or clicking the “XD” icon in the bottom right.

After the plugin opens it should look like the following screenshot.

## Opening a DSP
Download a customized DSP from the [Material Theme Builder](http://material.io/material-theme-builder) or default Material Theme values from [this repo](https://goo.gle/material-tokens) and save it to your computer.
Open up the folder in VSCode by either dragging it onto the open window or selecting “Open Folder”.

Open the Adobe XD plugin and select “Edit Package” on the bottom left, then select “Select Folder”. There should be a notification on the bottom left that should say “Existing package found…” and click on “Open”.

## Exploring the DSP
With the DSP opened in the plugin you should see the following screenshot.

The Material Tokens (DSP) is made up of a few sections (Light, Dark, Default, Palette, Typography).
## Generating Code
After inspecting the DSP you can generate code in the form of tokens to be used in your application.
Select “Start Editing” and then “Finish Editing” to trigger code generation. If it is the first time you are doing it there will be a notification to install Style Dictionary.

Select “Install” then you will see another notification asking to export tokens.

Select “Export tokens” then you will see a notification asking you to open the folder.

Opening the folder you will see the following sub directories.

This directory is located in the current directory under a newly generated folder “dist”.

Opening up the “variables.css” for example you will see the following flat list of tokens used to theme your application.

The “android/colors.xml” should look similar.

Using the Material Tokens (DSP) will ensure your styles are shared throughout your designer and developer workflow. Learn more about [Material Design Tokens](http://m3.material.io/foundations/design-tokens/overview).

好家伙VCC
- 粉丝: 2826
- 资源: 9136
最新资源
- 机器学习-bert模型
- 【毕业设计】基于Python的Django-html基于语音识别的智能垃圾分类系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- ERA5再分析数据根区土壤水分下载_era5土壤湿度-CSDN博客.html
- 【毕业设计】基于Python的Django-html基于小波变换的数字水印研究系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】基于Python的Django-html基于知识图谱的百科知识问答平台源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】基于Python的Django-html开放领域事件抽取系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】基于Python的Django-html旅游城市关键词分析系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】基于Python的Django-html基于知识图谱的医疗问答系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】基于Python的Django-html某大学学生影响力分析系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- Unity RPG地图场景资源
- 【毕业设计】基于Python的Django-html棉花数据平台建设与可视化系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- hymenoptera-data 数据集
- Java I/O流及其应用详解:字节流、字符流及相关工具类全面解析
- 机器学习-apriori算法-超市关联分析
- 【毕业设计】基于Python的Django-html企业物流管理系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】基于Python的Django-html某医院体检挂号系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


