Alternatives to styled-components logo

Alternatives to styled-components

Emotion, CSS Modules, CSS Blocks, Radium, and Ant Design are the most popular alternatives and competitors to styled-components.
1.1K
485
+ 1
10

What is styled-components and what are its top alternatives?

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 馃拝
styled-components is a tool in the JavaScript Framework Components category of a tech stack.
styled-components is an open source tool with 35.3K GitHub stars and 2.2K GitHub forks. Here鈥檚 a link to styled-components's open source repository on GitHub

Top Alternatives to styled-components

  • Emotion

    Emotion

    Emotion is a performant and flexible CSS-in-JS library. Building on many other CSS-in-JS libraries, it allows you to style apps quickly with string or object styles. It has predictable composition to avoid specificity issues with CSS. With source maps and labels, Emotion has a great developer experience and great performance with heavy caching in production. ...

  • CSS Modules

    CSS Modules

    It is a CSS file in which all class names and animation names are scoped locally by default. The key words here are scoped locally. With this, your CSS class names become similar to local variables in JavaScript. It goes into the compiler, and CSS comes out the other side. ...

  • CSS Blocks

    CSS Blocks

    By combining an opinionated authoring system, build-time analysis and rewriting of templates, and a new type of CSS optimizer, css-blocks breathes new power and ease of use into the technologies and best practices that stylesheet developers already know and love. ...

  • Radium

    Radium

    Radium is a set of tools to manage inline styles on React elements. It gives you powerful styling capabilities without CSS. ...

  • Ant Design

    Ant Design

    An enterprise-class UI design language and React-based implementation. Graceful UI components out of the box, base on React Component. A npm + webpack + babel + dora + dva development framework. ...

  • Sass

    Sass

    Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin. ...

  • Material-UI

    Material-UI

    MUI (formerly Material-UI) is the React UI library you always wanted. Follow your own design system, or start with Material Design. ...

  • PostCSS

    PostCSS

    PostCSS is a tool for transforming CSS with JS plugins. These plugins can support variables and mixins, transpile future CSS syntax, inline images, and more. ...

styled-components alternatives & related posts

Emotion logo

Emotion

199
190
3
The Next Generation of CSS in JS
199
190
+ 1
3
PROS OF EMOTION
  • 3
    Easy to use
CONS OF EMOTION
    Be the first to leave a con

    related Emotion posts

    Robert Zuber

    We are in the process of adopting Next.js as our React framework and using Storybook to help build our React components in isolation. This new part of our frontend is written in TypeScript, and we use Emotion for CSS/styling. For delivering data, we use GraphQL and Apollo. Jest, Percy, and Cypress are used for testing.

    See more
    Johnny Bell

    For Stack Decisions I needed to add Markdown in the decision composer to give our users access to some general styling when writing their decisions. We used React & GraphQL on the #Frontend and Ruby & GraphQL on the backend.

    Instead of using Showdown or another tool, We decided to parse the Markdown on the backend so we had more control over what we wanted to render in Markdown because we didn't want to enable all Markdown options, we also wanted to limit any malicious code or images to be embedded into the decisions and Markdown was a fairly large to import into our component so it was going to add a lot of kilobytes that we didn't need.

    We also needed to style how the markdown looked, we are currently using Glamorous so I used that but we are planning to update this to Emotion at some stage as it has a fairly easy upgrade path rather than switching over to styled-components or one of the other cssInJs alternatives.

    Also we used React-Mentions for tagging tools and topics in the decisions. Typing @ will let you tag a tool, and typing # will allow you to tag a topic.

    The Markdown options that we chose to support are tags: a, code, u, b, em, pre, ul, ol, li.

    If there are anymore tags you'd love to see added in the composer leave me a comment below and we will look into adding them.

    #StackDecisionsLaunch

    See more
    CSS Modules logo

    CSS Modules

    106
    132
    1
    A CSS file in which all class names and animation names are scoped locally by default
    106
    132
    + 1
    1
    PROS OF CSS MODULES
    • 1
      Static rather than compiled at runtime
    CONS OF CSS MODULES
      Be the first to leave a con

      related CSS Modules posts

      CSS Blocks logo

      CSS Blocks

      26
      34
      0
      A component-oriented CSS authoring system by LinkedIn
      26
      34
      + 1
      0
      PROS OF CSS BLOCKS
        Be the first to leave a pro
        CONS OF CSS BLOCKS
          Be the first to leave a con

          related CSS Blocks posts

          Radium logo

          Radium

          17
          33
          0
          A toolchain for React component styling
          17
          33
          + 1
          0
          PROS OF RADIUM
            Be the first to leave a pro
            CONS OF RADIUM
              Be the first to leave a con

              related Radium posts

              Ant Design logo

              Ant Design

              789
              1.3K
              205
              A set of high-quality React components
              789
              1.3K
              + 1
              205
              PROS OF ANT DESIGN
              • 39
                Lots of components
              • 30
                Polished and enterprisey look and feel
              • 20
                TypeScript
              • 18
                Easy to integrate
              • 18
                Es6 support
              • 16
                Beautiful and solid
              • 15
                Beautifully Animated Components
              • 14
                Quick Release rhythm
              • 13
                Great documentation
              • 12
                Typescript support
              • 10
                Short Code
              CONS OF ANT DESIGN
              • 17
                Less
              • 8
                Large File Size
              • 7
                Close
              • 4
                Poor accessibility support
              • 1
                Gago
              • 1
                Sdf

              related Ant Design posts

              Sarmad Chaudhary
              Founder & CEO at Ebiz Ltd. | 9 upvotes 路 435.7K views

              Hi there!

              I just want to have a simple poll/vote...

              If you guys need a UI/Component Library for React, Vue.js, or AngularJS, which type of library would you prefer between:

              1 ) A single maintained cross-framework library that is 100% compatible and can be integrated with any popular framework like Vue, React, Angular 2, Svelte, etc.

              2) A native framework-specific library developed to work only on target framework like ElementUI for Vue, Ant Design for React.

              Your advice would help a lot! Thanks in advance :)

              See more
              Shared insights
              on
              Material-UIMaterial-UIAnt DesignAnt Design

              Hi, I start building an admin dashboard with next.js and looking for a frontend framework ( components ready ). So I end up with Ant Design and Material-UI, but I never built a project with these two.

              Here is a list of my requirements.

              1. Good documentation.
              2. easy CRUD ( date picker and date range picker bundled )
              3. built-in multi-lang feature or Great 3rd library support
              4. Admin dashboard template
              5. well code maintenance

              Which is better for the long run?

              See more
              Sass logo

              Sass

              30.9K
              22.2K
              3K
              Syntactically Awesome Style Sheets
              30.9K
              22.2K
              + 1
              3K
              PROS OF SASS
              • 608
                Variables
              • 593
                Mixins
              • 467
                Nested rules
              • 411
                Maintainable
              • 299
                Functions
              • 150
                Modular flexible code
              • 141
                Open source
              • 112
                Selector inheritance
              • 107
                Dynamic
              • 96
                Better than cs
              • 4
                Used by Bootstrap
              • 2
                If and for function
              • 1
                Better than less
              • 1
                Inheritance (@extend)
              • 1
                Custom functions
              CONS OF SASS
              • 1
                Needs to be compiled

              related Sass posts

              Islam Diab
              Full-stack Developer at Freelancer | 9 upvotes 路 25.4K views

              Hi, I want to start freelancing, I have two years of experience in web development, and my skills in web development: HTML CSS JavaScript [basic, Object-Oriented Programming, Document object model, and browser object model] jQuery Bootstrap 3, 4 Pre-processor -> Sass Template Engine with Pug.js Task Runner with Gulp.js and Webpack Ajax JSON JavaScript Unit testing with jest framework Vue.js

              Node.js [Just basic]

              My Skills in Back end development Php [Basic, and Object-Oriented Programming] Database management system with MySql for database relationships and MongoDB for database non-relationships architecture pattern with MVC concept concept of SOLID Unit testing with PHPUnit Restful API

              Laravel Framework

              and version control with GitHub ultimately, I want to start working as a freelancer full time. Thanks.

              See more

              ReactQL is a React + GraphQL front-end starter kit. #JSX is a natural way to think about building UI, and it renders to pure #HTML in the browser and on the server, making it trivial to build server-rendered Single Page Apps. GraphQL via Apollo was chosen for the data layer; #GraphQL makes it simple to request just the data your app needs, and #Apollo takes care of communicating with your API (written in any language; doesn't have to be JavaScript!), caching, and rendering to #React.

              ReactQL is written in TypeScript to provide full types/Intellisense, and pick up hard-to-diagnose goofs that might later show up at runtime. React makes heavy use of Webpack 4 to handle transforming your code to an optimised client-side bundle, and in throws back just enough code needed for the initial render, while seamlessly handling import statements asynchronously as needed, making the payload your user downloads ultimately much smaller than trying to do it by hand.

              React Helmet was chosen to handle <head> content, because it works universally, making it easy to throw back the correct <title> and other tags on the initial render, as well as inject new tags for subsequent client-side views.

              styled-components, Sass, Less and PostCSS were added to give developers a choice of whether to build styles purely in React / JavaScript, or whether to defer to a #css #preprocessor. This is especially useful for interop with UI frameworks like Bootstrap, Semantic UI, Foundation, etc - ReactQL lets you mix and match #css and renders to both a static .css file during bundling as well as generates per-page <style> tags when using #StyledComponents.

              React Router handles routing, because it works both on the server and in the client. ReactQL customises it further by capturing non-200 responses on the server, redirecting or throwing back custom 404 pages as needed.

              Koa is the web server that handles all incoming HTTP requests, because it's fast (TTFB < 5ms, even after fully rendering React), and its natively #async, making it easy to async/await inside routes and middleware.

              See more
              Material-UI logo

              Material-UI

              1.5K
              2.8K
              372
              The React UI library you always wanted.
              1.5K
              2.8K
              + 1
              372
              PROS OF MATERIAL-UI
              • 115
                React
              • 76
                Material Design
              • 48
                Ui components
              • 25
                CSS framework
              • 20
                Component
              • 12
                Looks great
              • 10
                Responsive
              • 10
                Good documentation
              • 9
                LESS
              • 7
                Open source
              • 6
                Code examples
              • 5
                Ui component
              • 5
                Flexible
              • 4
                JSS
              • 3
                Supports old browsers out of the box
              • 3
                Very accessible
              • 3
                Angular
              • 2
                LADO
              • 2
                Designed for Server Side Rendering
              • 2
                Fun
              • 2
                Interface
              • 1
                Easy to work with
              • 1
                Asdasd
              • 1
                Barev Arman
              • 0
                555
              CONS OF MATERIAL-UI
              • 27
                Hard to learn. Bad documentation
              • 22
                Hard to customize
              • 18
                Hard to understand Docs
              • 6
                Bad performance
              • 5
                Extra library needed for date/time pickers
              • 5
                For editable table component need to use material-table
              • 5
                Long Code

              related Material-UI posts

              Adebayo Akinlaja
              Engineering Manager at Andela | 26 upvotes 路 787K views

              I picked up an idea to develop and it was no brainer I had to go with React for the frontend. I was faced with challenges when it came to what component framework to use. I had worked extensively with Material-UI but I needed something different that would offer me wider range of well customized components (I became pretty slow at styling). I brought in Evergreen after several sampling and reads online but again, after several prototype development against Evergreen鈥攕ince I was using TypeScript and I had to import custom Type, it felt exhaustive. After I validated Evergreen with the designs of the idea I was developing, I also noticed I might have to do a lot of styling. I later stumbled on Material Kit, the one specifically made for React . It was promising with beautifully crafted components, most of which fits into the designs pages I had on ground.

              A major problem of Material Kit for me is it isn't written in TypeScript and there isn't any plans to support its TypeScript version. I rolled up my sleeve and started converting their components to TypeScript and if you'll ask me, I am still on it.

              In summary, I used the Create React App with TypeScript support and I am spending some time converting Material Kit to TypeScript before I start developing against it. All of these components are going to be hosted on Bit.

              If you feel I am crazy or I have gotten something wrong, I'll be willing to listen to your opinion. Also, if you want to have a share of whatever TypeScript version of Material Kit I end up coming up with, let me know.

              See more

              My React website is a simple 5-pager that attaches to a database to store and display registrations and other data. The user (small user base) can change any form elements, but I don't need theme-ing, though that would be fun for the user. reactstrap/react-bootstrap built on Bootstrap 4 sounds dated. I am familiar with reactstrap, but a friend said to try Material-UI. The thought of learning it is interesting, but somehow I think it might be overkill. So... reactstrap, react-bootstrap, or Material UI, which should I use?

              See more
              PostCSS logo

              PostCSS

              512
              447
              50
              Transform CSS with JS plugins
              512
              447
              + 1
              50
              PROS OF POSTCSS
              • 21
                The "babel" of CSS
              • 15
                Customizable
              • 8
                Autoprefixer
              • 2
                Variables
              • 1
                PostCSS Flexbugs Fixes
              • 1
                0
              • 1
                Mixins
              • 1
                CSS MQPacker
              CONS OF POSTCSS
                Be the first to leave a con

                related PostCSS posts

                ReactQL is a React + GraphQL front-end starter kit. #JSX is a natural way to think about building UI, and it renders to pure #HTML in the browser and on the server, making it trivial to build server-rendered Single Page Apps. GraphQL via Apollo was chosen for the data layer; #GraphQL makes it simple to request just the data your app needs, and #Apollo takes care of communicating with your API (written in any language; doesn't have to be JavaScript!), caching, and rendering to #React.

                ReactQL is written in TypeScript to provide full types/Intellisense, and pick up hard-to-diagnose goofs that might later show up at runtime. React makes heavy use of Webpack 4 to handle transforming your code to an optimised client-side bundle, and in throws back just enough code needed for the initial render, while seamlessly handling import statements asynchronously as needed, making the payload your user downloads ultimately much smaller than trying to do it by hand.

                React Helmet was chosen to handle <head> content, because it works universally, making it easy to throw back the correct <title> and other tags on the initial render, as well as inject new tags for subsequent client-side views.

                styled-components, Sass, Less and PostCSS were added to give developers a choice of whether to build styles purely in React / JavaScript, or whether to defer to a #css #preprocessor. This is especially useful for interop with UI frameworks like Bootstrap, Semantic UI, Foundation, etc - ReactQL lets you mix and match #css and renders to both a static .css file during bundling as well as generates per-page <style> tags when using #StyledComponents.

                React Router handles routing, because it works both on the server and in the client. ReactQL customises it further by capturing non-200 responses on the server, redirecting or throwing back custom 404 pages as needed.

                Koa is the web server that handles all incoming HTTP requests, because it's fast (TTFB < 5ms, even after fully rendering React), and its natively #async, making it easy to async/await inside routes and middleware.

                See more
                awesomebanana2018
                Shared insights
                on
                PostCSSPostCSSStylusStylusSassSass

                Originally, I was going to start using Sass with Parcel, but then I learned about Stylus, which looked interesting because it can get the property values of something directly instead of through variables, and PostCSS, which looked interesting because you can customize your Pre/Post-processing. Which tool would you recommend?

                See more