Giter Site home page Giter Site logo

nextniko / react-devui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devcloudfe/react-devui

0.0 0.0 0.0 4.57 MB

DevUI components based on React

Home Page: https://react-devui.com

License: MIT License

Shell 0.12% JavaScript 10.99% SCSS 16.11% TypeScript 72.68% HTML 0.09%

react-devui's Introduction

React DevUI

DevUI components based on React

English | 简体中文

In development.

Need unit test support (Jest) 🤝

Start

We add chmod ug+x .husky/ at prepare that make sure the files is executable in linux. So you use other OS, just ignore error.

Execute the following command to preview the component:

yarn site:serve

For contributions, please refer to Contribution Guide.

Design Guidelines

Code

  • Use Hooks to complete the components.
  • To maintain the independence of the components to the greatest extent, the use of component combination has completed more complex logic, for example: the Drawer component separates the Header, so that we can use the DrawerHeader alone instead of passing the Props of the Header to the Drawer component. More than that, separate components So that we don't have to worry about the future component functions are more and more difficult to maintain.
  • Use structured comments to layer the code structure to keep the structure clear when the function component code is large, and provide guidance for migration to Angular and Vue.
  • We provide useAsync to manage asynchronous functions. By intercepting asynchronous methods, such as setTimeout, we ensure that asynchronous functions will not be executed after the component is destroyed.
  • Ensure that the component Props inherits React.HTMLAttributes<HTMLElement>, we hope that the use of the component is consistent with the DOM element.
  • Don't introduce third-party components, we want the components to be completely controllable.
  • For more details, please refer to the implementation of the typical Drawer component.

Style

  • The class naming follows the BEM specification.
  • Use class instead of style whenever possible to allow users to modify the style.
  • We use sass output style, but our variables use native var().
  • If it is not necessary, do not create separate variables for the components. We hope that the theme system is simple and easy to use.
  • All font-size use RFS to achieve responsive text.

Other

  • Be sure to follow WAI-ARIA, some undefined components, such as Drawer, we should also try our best according to the usage Provide WAI-ARIA support.
  • Support internationalization.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.