EmotionJS: Style effectively!!

What is Emotion?

Photo by Tengyart on Unsplash
Logo of EmotionJS library

To install Emotion to your React Project

How to use emotion with React

A basic code to create a button component in react code
Button rendered with the styles

Changing based on props

Button on hover
Button style changed based on condition provided with props
Button style changed according to the state provided

That’s how you can style with emotion in your React app!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aarushi Lal

A UI person by profession, often fascinated with the world around. Loves to delineate a story , a moment or a thought via sketch or camera.