Theming styled-components and creating styling add-ons.

Elegant way to markup theme-able properties in your styles.

Image for post
Image for post

Github NPM

import styledProps from 'styled-addons'const Button = styledProps ('button')`
font-size: 15px;
color: $theme.color;
background: $theme.background;
`;
export default Button;

Docs

How does styledProps work?

Image for post
Image for post
styledProps(...)`
color: $theme.abc;`
styledProps(...)`
color: ${props => props.theme.abc}`

Why use styled-addons?

Image for post
Image for post

Other similar libraries

What is your preferred styling solution ?

Image for post
Image for post

Github NPM

Software Engineer @ Telia Finland

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