# 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.
![alt_text](/assets/image9.png)
[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.
![alt_text](/assets/image13.png)
After the plugin opens it should look like the following screenshot.
![alt_text](/assets/image2.png)
## 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”.
![alt_text](/assets/image7.png)
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”.
![alt_text](/assets/image5.png)
## Exploring the DSP
With the DSP opened in the plugin you should see the following screenshot.
![alt_text](/assets/image10.png)
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.
![alt_text](/assets/image1.png)
Select “Install” then you will see another notification asking to export tokens.
![alt_text](/assets/image8.png)
Select “Export tokens” then you will see a notification asking you to open the folder.
![alt_text](/assets/image3.png)
Opening the folder you will see the following sub directories.
![alt_text](/assets/image11.png)
This directory is located in the current directory under a newly generated folder “dist”.
![alt_text](/assets/image4.png)
Opening up the “variables.css” for example you will see the following flat list of tokens used to theme your application.
![alt_text](/assets/image6.png)
The “android/colors.xml” should look similar.
![alt_text](/assets/image12.png)
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
- 粉丝: 2410
- 资源: 9138
最新资源
- 将电脑屏幕录屏转换成gif
- MATLAB代码:基于非对称纳什谈判的多微网P2P电能交易策略 关键词:纳什谈判 合作博弈 微网 电转气-碳捕集 P2P电能交易交易 参考文档:加好友获取 仿真平台:MATLAB CPLE
- WebSocket长连接实现步骤:基于心跳机制的消息处理与连接管理详解
- MATLAB代码:基于模型预测算法的含储能微网双层能量管理模型 关键词:储能优化 模型预测控制MPC 微网 优化调度 能量管理 参考文档:私 主要内容:代码主要做的是一个微网双层优化调度模型,微网
- “厉行节约从我做起”班会教案课件模板.pptx
- “班主任工作经验交流”中小学老师培训教案课件.pptx
- 电子元件自动整形机(sw16可编辑+工程图)全套技术资料100%好用.zip
- “光盘行动,节约粮食”教案课件.pptx
- 家庭教育“亲子沟通技巧”教案课件.pptx
- 荷花素才“廉政文化”讲座教案课件模板.pptx
- 人工大猩猩部队GTO优化CNN-LSTM用于多变量负荷预测(Matlab) 所有程序经过验证,保证有效运行 2.提出了一种基于CNN-LSTM的多变量电力负荷预测方法,该方法将历史负荷与气象数据作
- 鲜花商城(springboot+vu)
- 1.Matlab实现SSA-CNN-GRU麻雀算法优化卷积门控循环单元时间序列预测; 2.输入数据为单变量时间序列数据,即一维数据; 3.运行环境Matlab2020b及以上,data为数据集,运行主
- 1736388797326.zip
- 在matlab中用蒙特卡洛算法对电动汽车充电负荷进行模拟,可自己修改电动汽车数量,复现 参考lunwen:基于V2G的电动汽车充放电优化调度策略 有注释简单易懂,可随意调整参数
- 研究背景:随着超快激光应用越来越广泛,对超快激光加工过程的材料去除过程就比较关心 研究内容:利用COMSOL仿真软件,构建三维模型,研究电子和晶格温度,引入热焓法对相变过程进行研究 关键词:双温方
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈