- Notifications
You must be signed in to change notification settings - Fork75
casesandberg/reactcss
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Inline Styles in JS with support forReact,React Native,Autoprefixing,Hover,Pseudo-Elements &Media Queries
npm install reactcss --save
Define a default styles for your elements:
importreactCSSfrom'reactcss'conststyles=reactCSS({'default':{card:{background:this.props.background,boxShadow:'0 2px 4px rgba(0,0,0,.15)',},},})
Pass style definitions via inline styles:
<divstyle={styles.card}/>
Activate additional classes by passing down objects as additional parameters toreactCSS
:
conststyles=reactCSS({'default':{card:{background:'#fff',boxShadow:'0 2px 4px rgba(0,0,0,.15)',},},'zIndex-2':{card:{boxShadow:'0 4px 8px rgba(0,0,0,.15)',},},},{'zIndex-2':props.zIndex===2,})
See theFull Documentation
Examples and projects built with reactCSS:
Felony - Next Level PGP Desktop AppReact Color - Color Pickers from Sketch, Photoshop, Chrome, Github, Twitter & moreBuffer App Components - A shared set of UI ComponentsReact Reactions - Use Reactions from Slack, Facebook, Pokemon, Github and Youtube