{"repo":"styled-components/vue-styled-components","free":true,"listed":false,"github":"https://github.com/styled-components/vue-styled-components","clone":"git clone https://github.com/styled-components/vue-styled-components.git","description":"Visual primitives for the component age. A simple port for Vue of styled-components 💅","language":"JavaScript","stars":1379,"topics":["vue","css-in-js","vue-styled-components","css"],"license":"MIT","category":"ui-components","readme_excerpt":"vue-styled-components Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅 Support This version is compatible with Vue 2.x Utilising tagged template literals (a recent addition to JavaScript) and the power of CSS allows you to write actual CSS code to style your components. It also removes the mapping between components and styles – using components as a low-level styling construct could not be easier! This is a (not fully-featured)fork from original styled-components made by Glen Maddern and Max Stoiber, supported by Front End Center and Thinkmill. Thank you for making this project possible! Usage Register first your component locally (see https://vuejs.org/v2/guide/components.html#Local-Registration) Basic Do not use built-in or reserved HTML elements as component id (title, button, input...). This creates two Vue components, and : You render them like so: Passed props Styled components pass on all their props. This is a styled : You can just pass a placeholder prop into the styled-component . It will pass it on to the DOM node like any other Vue component: Adapting based on props This is a button component that has a primary state. By setting primary to true when rendering it we adjust the background and text color. Important A prop is a custom attribute for passing information from parent components. A child component needs to explicitly declare the props it expects to receive using the props option, you must defin","default_branch":null,"files":null,"tree":[],"storefront":"/r/styled-components","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/styled-components/vue-styled-components/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."}