Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>cssToJSNew to Visual Studio Code? Get it now.
cssToJS

cssToJS

Rhys Tyers

|
1,526 installs
| (0) | Free
Convert css to js objects for use in React
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

cssToJS README

Features

Converts a selected block of css to js format. Good, for example, for copying styling from Chrome dev tools to a React CSS object.

cssToJS preview

How to use

Highlight a some css like

text-align: center;
display: inline-flex;

Open your command pallete (cmd + shift + p on mac) and run the Convert CSS command. Hopefully you'll get some js formatted css:

textAlign: 'center',
display: 'inline-flex',

Github
VSCode Marketplace

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft