Bundle size (from BundlePhobia): 1.2mB after minification, 349.2kB after gzip compression, reduce the size by tree shaking.
Pros:
AntDesign comes with extensive supporting documentation, has a community, and includes a separate project (AntDesignPro) with pre-made templates;
UI library that can be used to quickly design backend/internal applications.
Disadvantages:
Lack of accessibility;
Large size, expected to have a large impact on performance;
Pollute your CSS (expect to add !important to prevent it from styling your non-Ant components).
Bootstrap
##In fact, I mainly regard Bootstrap as a UI library. It won’t win you any design awards, but it can be used to complete some edge projects and minimum viable products. But it depends on what you want to use it for. If you're new to React, it's a great library to get started with. For more experienced developers, they might look into styled-components / Emotion. There are two popular libraries with React bindings for Bootstrap, I personally only use Reactstrap. Project link:
Bundle size (from BundlePhobia): 152.1kB after minification, 39.4kB after gzip compression, reduce the size by tree shaking
Advantages:
The Bootstrap library with React bindings that everyone loves;
Easily customizable via CSS-in-JS;
It’s been around long enough , so no need to worry about bugs/issues;
Get started quickly;
No jQuery dependencies as it has been completely re-implemented in React.
shortcoming:
This is Bootstrap: if you don’t customize it, your site will look like any other.
Bulma
Bulma is different from other libraries introduced in this article because Bulma is pure CSS Framework, no JS required. You can choose to use classes from Bulma directly or use a wrapper library such as react-bulma-components.
Bundle size (from BundlePhobia): 326.2kB minified, 101.2kB gzipped, reduced by tree shaking
Pros:
Accessibility: Following WAI-ARIA guidelines, components use aria tags;
Powered by Discord server;
Easily customizable (with theme support);
Highly modular, so tree shaking will actually remove code you don't use.
Disadvantages:
Quite new.
NOTE:
It is very close to the v1 version, so please be aware of breaking changes after v0.8.0.
Material UI
MaterialUI is one of those libraries that I have a love-hate relationship with. It's helped me get through some very stressful project deadlines in the past, but in the end I always got it out of the way as quickly as possible.
In the past, you could only customize MaterialUI's styles by writing JSS, but thankfully you can now override styles using styled-components and Emotion.
ReachUI is a low-level component library that allows developers to build accessible React components into their design systems. There is no package size available because each component is exported individually as its own npm package.
Reakit
Reakit is another low-level component library. Technically it's a UI library, but it doesn't come with CSS. So you still need to find a styling solution.
Bundle size (from BundlePhobia): 119.9kB minified, 32.1kB gzip compressed, reduced by tree shaking.
Rebass
I have been following Rebass for a while. It is a powerful component library that does not come with a theme, but you can easily change the theme. For a practical example of it, see its demo:
Bundle size (from BundlePhobia): 43kB after minification, gizp compression 14.4kB, reduce the size by tree shaking.
Tip
When writing this list, I tried to avoid including commercial design systems, but some systems (Material UI) have become widely adopted, so they are not included The list would not be complete.
I also intentionally omitted CSS-in-JS (such as styled-components and Emotion) and utility CSS systems (such as Tailwind, https://tailwindcss .com/), because they are not explicitly "React component libraries" but rather tools for making components.
The above is the detailed content of What components does react have?. For more information, please follow other related articles on the PHP Chinese website!
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn