styled-ppx is a ppx that brings styled components to ReScript. Built on top of emotion, it allows you to style apps safely, quickly, and performantly - just as you have always done it. styled-ppx allows you to create React Components with type-safe style definitions that don't rely on a different language (DSL) except CSS.
npm install @davesnx/styled-ppx
Add "@davesnx/styled-ppx/ppx"
under bsconfig "ppx-flags"
:
{
"bs-dependencies": [
"@rescript/react",
+ "@davesnx/styled-ppx/css",
+ "@davesnx/styled-ppx/emotion"
],
+ "ppx-flags": ["@davesnx/styled-ppx/ppx"]
}
Read more about getting started.
For the entire documentation, visit styled-ppx.vercel.app.
We provide an editor extension that brings syntax highlighting. (In the future it may include IntelliSense or other CSS-related features.)
Install the VSCode Extension.
Install the vim plugin.
If you are interested on another editor, please file an issue.
We would love your help improving styled-ppx! Please see our contributing and community guidelines; they'll help you get set up locally and explain the whole process: CONTRIBUTING.md.
This project is licensed under the Simplified BSD License (BSD 2-Clause License).