[question] How to use Material UI Sync plugin to actually use tokens in code #418
Labels
figma
scope: sync
Issues related to the Material UI Sync Figma plugin
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
support: question
Community support but can be turned into an improvement
The problem in depth
I am using the 'vanilla' version of the MUI Sync plugin. When downloading the
theme.json
file I would only expect the exceptions that would be made on top of the default MUI theme. However out of the box, thetheme.json
file is larger than expected (125K) without any customizations. There is limited documentation how to actually use thetheme.json
file in code. So I tried to the best i could to use it, however I see unexpected things, like the default MUI button with a width of 355px. If I delete the MuiButton override fromtheme.json
the issues goes away.I'm wondering if I'm using it correctly, as a developer I'd rather download the generated
theme.json
rather than copy pasting code for (me) obvious reasons on codestyling and linting and copy/paste errors.My implementation:
The weird thing is though the MUIButton in
theme.json
seems to be contain extremely much overrides for the button alone, if I remove them, the file shrinks to 12K.Your environment
Material UI Sync Plugin
v6.1.0
@mui/material version
^6.1.4
Search keywords: Material UI Sync Theme Design Tokens
The text was updated successfully, but these errors were encountered: