Styled-components Alternatives
-
Tailwind CSS
A utility-first CSS framework for rapid UI development.
-
Next.js
The React Framework
-
Scout
Get performance insights in less than 4 minutes. Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
-
classnames
A simple javascript utility for conditionally joining classNames together
-
razzle
✨ Create server-rendered universal JavaScript applications with no configuration
-
twind
The smallest, fastest, most feature complete Tailwind-in-JS solution in existence.
-
TypeScript-Website
The Website and web infrastructure for learning TypeScript
-
developer-roadmap
Roadmap to becoming a web developer in 2021
-
Flutter
Flutter makes it easy and fast to build beautiful apps for mobile and beyond.
-
Visual Studio Code
Visual Studio Code
-
parcel
📦🚀 Blazing fast, zero configuration web application bundler
-
formik
Build forms in React, without the tears 😭
-
Bit
Build, distribute, and collaborate on components.
-
emotion
👩🎤 CSS-in-JS library designed for high performance style composition
-
Radium
A toolchain for React component styling.
-
Microbundle
📦 Zero-configuration bundler for tiny modules.
-
Aphrodite
Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation
-
theme-ui
Build consistent, themeable React apps based on constraint-based design principles
-
jest-styled-components
🔧 💅 Jest utilities for Styled Components
-
compiled
Build time atomic CSS-in-JS. Baked and ready to serve.
-
actions
Posts
- Voltar a estudar programação e dinheiro
-
Web developers on my team can't make my designs responsive
A more modern solution is to use a library like 'styled-components' or 'css blocks'. I personally use styled-components in our companies projects. styled-components allows to define css rules on a global or local level. The big advantage is that you don't have to worry about side effects when you apply styles to a specific component. Also styled-components has an out-of-the-box theming engine. Which makes later requirements (like a dark mode, or changing breakpoints) easy to handle. https://styled-components.com/
-
Share variables between JavaScript and CSS
I've already mentioned Emotion, but other CSS-in-JS libraries to check out include Styled Components, JSS, Theme-UI, Radium, and Aprhodite.
-
Media queries & custom props on Styled Components | React
In this step I will assume that we have a project with React, Typescript and Styled Components configured correctly and I will only show the dependencies that will be used in this tutorial:
-
From Create React App to SSR with Razzle
The app was being implemented using Styled Components that already comes with an integrated solution for SSR, allowing you to load all the required styles for the target page and put it at the end of your
- React - Bora estilizar?
-
The tiniest CSS-in-JS solution for your open-source React components
It seemed like a good solution, but we've started receiving complaints from many developers that were unable to use the styles. It is quite common in the React ecosystem to use libraries like Emotion, Styled-Components, or other CSS-in-JS libraries exclusively and to entirely forgo the inclusion of a style loader. As such, usage of react-colorful would necessitate the alteration of build configurations for these users to be able to access the default styling.
-
🎨 Light mode e Dark mode e temas customizados com Styled-components e NextJS com Typescript.
Styled-components
- TailwindCSS vs Styled-Components in ReactJs
-
Css help
I just usually include css import to my components - that works just fine. Then if you need some value calculated in JS just use style={{param: yourValue}} Alternatively you could use https://styled-components.com/. Styled components support props so you can add responsiveness by passing them into styles components.
-
How to Build A React TS Tailwind Design System
All of the front-end apps are built with React and adopted Styled Components at some point. Some had also SaSS mixed in, some had TypeScript, and some Flow.
-
Hot take: all CSS frameworks are bad
Styled components do have the advantage of being javascript, in that its very flexible and can give you pretty fine grain control of how your styles react to state/prop changes. However, it requires a shift in how you write your styles and isn't exactly 1:1 with using normal css classes in react, see https://github.com/styled-components/styled-components/issues/3179 as an example. In general, I'm hesitant to add more abstraction than is really needed to a code base, since it kinda gets out of hand on its own in js ecosystem.
-
Understanding Tagged Template Literal in JS
This features is so powerful that some awesome libraries were built on it such as Styled Components and graphql-tag.
Stats
styled-components/styled-components is an open source project licensed under MIT License which is an OSI approved license.