# Material-UI Framework in React plugin?

**URL:** <https://forums.creativeclouddeveloper.com/t/material-ui-framework-in-react-plugin/1829>\
**Category:** UXP Plugin API\
**Tags:** react, ui\
**Created:** [June 9, 2020, 5:08pm UTC](https://forums.creativeclouddeveloper.com/t/material-ui-framework-in-react-plugin/1829 "2020-06-09T17:08:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanpfalz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/ryanpfalz/32/844_2.png) [@ryanpfalz](https://forums.creativeclouddeveloper.com/u/ryanpfalz)\
**Post date:** [June 9, 2020, 5:08pm UTC](https://forums.creativeclouddeveloper.com/t/material-ui-framework-in-react-plugin/1829/1 "2020-06-09T17:08:18Z")

</div>

Hello,

I am in the process of creating an XD plugin using React (very new to the community!). I have had trouble with some libraries, namely Material-UI among some others. I get errors when importing the libraries (eg “TypeError: window.getComputedStyle is not a function”).

A few comments/questions:

- Per the documentation, I understand that “[the XD plugin API environment is not a browser, nor is it Node.js](https://adobexdplatform.com/plugin-docs/reference/javascript/environment.html?h=application#not-a-browser-and-not-nodejs)”, and that I should not assume that APIs that work in other environments will work in XD. That alone may be evidence that this framework will not work in this environment. (Another part of the documentation that may suggest frameworks like this won’t work is where it says that “Npm packages that only depend on the core JavaScript language APIs can work in XD”).

- I also noticed that the XD documentation provides guides on UX patterns and requirements - I assume this is to ensure that plugins conform to the native styling and experience in XD.

So, my questions: Are my assumptions correct - given the environment limitations + UX requirements, are design/styling frameworks generally off-limits in XD?

This question was originally posted [here](https://community.adobe.com/t5/adobe-xd/material-ui-framework-in-react-plugin/td-p/11194694?page=1)

---

<div class="post-metadata">

**Author:** ![MattM](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@MattM](https://forums.creativeclouddeveloper.com/u/MattM)\
**Post date:** [December 28, 2020, 6:20pm UTC](https://forums.creativeclouddeveloper.com/t/material-ui-framework-in-react-plugin/1829/2 "2020-12-28T18:20:05Z")

</div>

I’m also interested in this topic. @ryanpfalz have you figured if this is possible?

---

<div class="post-metadata">

**Author:** ![ryanpfalz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/ryanpfalz/32/844_2.png) [@ryanpfalz](https://forums.creativeclouddeveloper.com/u/ryanpfalz)\
**Post date:** [December 28, 2020, 7:45pm UTC](https://forums.creativeclouddeveloper.com/t/material-ui-framework-in-react-plugin/1829/3 "2020-12-28T19:45:58Z")

</div>

@MattM Unfortunately, this is not possible - I ended up just using the native React elements. Since the XD plugin environment is not a browser nor is it Node.js, not all packages are supported - only those which depend on the core JS language APIs.  
See these docs:

> **[JavaScript support · Adobe XD Plugin Reference](https://adobexdplatform.com/plugin-docs/reference/javascript/javascript-support.html?q=#can-i-use-npm-packages-or-nodejs-apis)**

> **[API environment · Adobe XD Plugin Reference](https://adobexdplatform.com/plugin-docs/reference/javascript/environment.html?q=#not-a-browser-and-not-nodejs)**

Hope this helps.

---

<div class="post-metadata">

**Author:** ![MattM](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@MattM](https://forums.creativeclouddeveloper.com/u/MattM)\
**Post date:** [December 29, 2020, 5:59pm UTC](https://forums.creativeclouddeveloper.com/t/material-ui-framework-in-react-plugin/1829/4 "2020-12-29T17:59:22Z")

</div>

Thanks for getting back to me - it saved me a bunch of time.
