Search code examples
pluginsrequireadobe-xd

Can you use ES2015+ features (ES6) in Adobe XD plugins?


I'm building a plugin in Adobe XD. Can I use ES2015+ (ES6) features? For example, template literals, let , const, Arrow functions, asynchronous functions ( async / await )?


Solution

  • XD plugin APIs support most of ES2015 and beyond. You can use features such as:

    • Template literals
    • Classes
    • Block-scoped variables ( let , const )
    • Object destructuring
    • Default parameters
    • Spread and Rest ( ... )
    • Arrow functions
    • Asynchronous functions ( async / await )
    • Promises

    You can also use ES5 JavaScript features as well.

    The XD plugin API docs have a page on JavaScript support.