How can I export PSD layer styles as CSS in JS code?

Photoshop currently doesn't offer an option to generate CSS in JS code. But there is a way how to do it with Avocode - see below.


Would you like to update this article? Please contact us at team@avocode.com

Learn more

Need to extract CSS in JS code without Photoshop? Try Avocode

No need to buy or install Photoshop. Open and export assets from layered Photoshop designs on Mac, Windows, Linux or in the browser with Avocode.

Open your design and go to the Select Tool or hold V key. Then switch to the Code panel and make sure your code language is set to CSS in JS.

When you click on any design layer, its styles will appear as CSS in JS in the Code panel. Either click COPY ALL to export the whole code snippet or select particular lines or values and they will be copied to your clipboard.

To customize the code output, feel free define any value as a Variable, use Replacement rules to replace any part of the generated code. You can even reorder or hide specific code properties, change quote type and much more in Code settings.

Avocode

Export CSS in JS code from a PSD without Photoshop

Get started with Avocode

Start with 14-day free trial. No credit card required.