All Projects → UCloud-FE → React Components

UCloud-FE / React Components

Licence: mit
React components

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Components

Yoshino
A themable React component library!Flexible Lightweight PC UI Components built on React! Anyone can generate easily all kinds of themes by it!
Stars: ✭ 216 (+359.57%)
Mutual labels:  component, components, react-components
React Weui
weui for react
Stars: ✭ 2,793 (+5842.55%)
Mutual labels:  components, react-components
furl
Functional react.js components.
Stars: ✭ 33 (-29.79%)
Mutual labels:  components, react-components
Reactackle
Open-source components library built with React and Styled-Components.
Stars: ✭ 278 (+491.49%)
Mutual labels:  components, react-components
NE-Component
A react component library.
Stars: ✭ 29 (-38.3%)
Mutual labels:  components, react-components
tailwind-antd-react-kit
UI Components and helpers for frontend development using Tailwind + Ant Design and React.js
Stars: ✭ 27 (-42.55%)
Mutual labels:  components, react-components
Flawwwless Ui
Flawwwless ui library for React.js.
Stars: ✭ 265 (+463.83%)
Mutual labels:  components, react-components
React Splitters
React splitter component, written in TypeScript.
Stars: ✭ 127 (+170.21%)
Mutual labels:  component, react-components
Cp Design
A configurable Mobile UI Components(React hooks+Typescript+Scss)组件库
Stars: ✭ 465 (+889.36%)
Mutual labels:  component, react-components
Rsuite
🧱 A suite of React components .
Stars: ✭ 6,344 (+13397.87%)
Mutual labels:  component, react-components
React Fontawesome
A React Font Awesome component.
Stars: ✭ 662 (+1308.51%)
Mutual labels:  component, components
Vue Form Json Schema
Create forms using JSON schema. Bring your components!
Stars: ✭ 253 (+438.3%)
Mutual labels:  component, components
Create Component App
Tool to generate different types of React components from the terminal. 💻
Stars: ✭ 879 (+1770.21%)
Mutual labels:  components, react-components
engage-ui
Engage UI is a React component library designed to help developers and designers creater the delightful web experiences.
Stars: ✭ 14 (-70.21%)
Mutual labels:  components, react-components
React Step Progress Bar
A library to create stunning progress bars and steps in React 🌡
Stars: ✭ 140 (+197.87%)
Mutual labels:  component, react-components
Switzerland
🇨🇭Switzerland takes a functional approach to Web Components by applying middleware to your components. Supports Redux, attribute mutations, CSS variables, React-esque setState/state, etc… out-of-the-box, along with Shadow DOM for style encapsulation and Custom Elements for interoperability.
Stars: ✭ 261 (+455.32%)
Mutual labels:  component, components
Thorui Uniapp
ThorUI组件库,轻量、简洁的移动端组件库。组件文档地址:https://thorui.cn/doc/ 。 最近更新时间:2021-10-01
Stars: ✭ 1,842 (+3819.15%)
Mutual labels:  component, components
React Modal Box
React Modal Box, is a simple dependency free and customizable React Component to display Modals on your application. Its simple event system allows you to place the modal in the root component of your application, and calling it with the simple mixins, allows you to be flexible. It also includes event handling mixins, so you can detect when the modal is being called or being hidden.
Stars: ✭ 126 (+168.09%)
Mutual labels:  component, components
Chakra Ui
⚡️Simple, Modular & Accessible UI Components for your React Applications
Stars: ✭ 295 (+527.66%)
Mutual labels:  components, react-components
Awesome Ui Component Library
Curated list of framework component libraries for UI styles/toolkit
Stars: ✭ 702 (+1393.62%)
Mutual labels:  components, react-components

React Components

npm version TravisCI CircleCI codecov Commitizen friendly Conventional Commits

前排注意事项

  • 一些没有写在文档中的 props 以及方法等强烈不建议使用,因为这类 API 可能会随时变动。版本更新后可能会发生不可预知的问题。

浏览器兼容

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
IE11, Edge 18 29 30 7

如何使用

  • 组件依赖于 react(^16)、react-dom(^16),请注意引入对应依赖,从 0.7.0 开始,不再兼容 react 15。

  • 使用 npm 或 yarn 进行安装

<!-- install use yarn -->
yarn add @ucloud-fe/react-components
<!-- install use npm -->
npm install @ucloud-fe/react-components
<!-- install with a fixed version -->
yarn add @ucloud-fe/[email protected]
  • 导入组件并按需导入字体样式并使用
import { Button } from '@ucloud-fe/react-components';
// 按需导入字体icon样式,可省略
import '@ucloud-fe/react-components/dist/icon.min.css';

class App extends Component {
    render() {
        return (
            <div>
                <Button>按钮</Button>
            </div>
        );
    }
}

export default App;
  • 需要注意对应修改 webpack 的 loader 配置,根据项目具体配置
{
    rules: [
        {
            test: /\.css$/,
            use: ['style-loader', 'css-loader']
        },
        {
            test: /.(svg|eot|ttf|woff)$/,
            use: [
                {
                    loader: 'file-loader',
                    options: {
                        name: 'assets/[name].[ext]'
                    }
                }
            ]
        }
    ];
}
  • 实现模块化加载

    • 通过babel-plugin-import实现模块化加载
    <!-- 添加import插件 -->
    npm install babel-plugin-import --dev
    
    <!-- 在babel的plugins中添加配置 -->
    {
        "plugins": [
            [
                "import",
                {
                    "libraryName": "@ucloud-fe/react-components",
                    "camel2DashComponentName": false,
                    "libraryDirectory": "lib/components"
                }
            ]
        ]
    }
    
    • 或者直接手动引用对应文件来实现模块化加载
    import Button from '@ucloud-fe/react-components/lib/components/Button';
    

如何在 Create-React-App 中使用

添加到依赖

  1. 通过 Create-React-App 创建好项目
  2. 按照上述文档将 react-components 添加到依赖,然后按照需要去引用

模块化支持

  1. 修改项目的自定义配置,不支持的需要先执行npm run eject
  2. 按照上述文档在 babel 的 plugin 中添加配置

zIndex 说明

  • Modal,Drawer 默认的 zIndex 为 1010
  • Popover,Tooltip 默认的 zIndex 为 1030,包括其他的用到 Popover 且默认容器为 body 的地方,如 Table.ActionList、Table 的 contxtMenu 等
  • Message 默认的 zIndex 为 1060
  • Select、DatePicker 等的弹出层默认容器为组件内部,所以 zIndex 比较低为 100
  • Loading 默认的 zIndex 为 10
  • 其余内部使用的 zIndex 为 10 以下
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].