Rasty
npm install rasty
Rasty provides you yet another styling way in JS.
Use Rasty with React.
Features
- Style mixin
- States (eg.
:hover
) supported - Media queries supported
- Keyframes supported
Usage
Basic
Define style
const style = Rasty;
className
to HTML element
Set { return <p className=styleclassName> Lorem ipsum </p> ;}
Using states
Define style
const style = Rasty;
className
to HTML element
Set { return <p className=styleclassName> Lorem ipsum </p> ;}
className
modifier
Using Define style
const style = Rasty;
className
to HTML element
Set { return <p className=styleclassNameisHidden: thisstateisHidden> Lorem ipsum </p> ;}
Using media queries
Define style
const style = Rasty;
className
to HTML element
Set { return <p className=styleclassName> Lorem ipsum </p> ;}
Also, you can generate media query
ES6 syntax
const devices = mobile: Rasty desktop: Rasty const style = Rasty;
Nesting style
Define style
const style = Rasty;
className
to HTML element
Set { return <p className=styleclassNameisFoo: thisstateisFoo isBar: thisstateisBar> Lorem ipsum </p> ;}
Keyframes
const keyframes = Rasty; const style = Rasty;