{"repo":"styled-components/styled-theming","free":true,"listed":false,"github":"https://github.com/styled-components/styled-theming","clone":"git clone https://github.com/styled-components/styled-theming.git","description":"Create themes for your app using styled-components","language":"JavaScript","stars":1170,"topics":["react","css-in-js","styled-components","theming"],"license":"MIT","category":"ui-components","readme_excerpt":"styled-theming Create themes for your app using styled-components Read the introductory blog post Installation Example API See styled-components docs is part of styled-components, but is required for styled-theming. accepts a single prop theme which you should pass an object with either strings or getter functions. For example: You should generally set up a at the root of your app: theme(name, values) Most of your theming will be done with this function. name should match one of the keys in your theme. values should be an object where one of the keys will be selected by the value provided to theme. The values of this object can be any CSS value. These values can also be functions that return CSS values. theme will create a function that you can use as a value in styled-component's styled function. The values will be passed through like any other interpolation in styled-components. You can use the css helper to add entire blocks of styles, including their own interpolations. theme.variants(name, prop, themes) It's often useful to create variants of the same component that are selected via an additional prop. To make this easier with theming, styled-theming provides a theme.variants function.","default_branch":null,"files":null,"tree":[],"storefront":"/r/styled-components","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/styled-components/styled-theming/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}