react-toolkit icon indicating copy to clipboard operation
react-toolkit copied to clipboard

Flexible components html + css + react using BEM convention. Maybe, you can call it "Design System" !

trafficstars

@axa-fr/react-toolkit

Build status Quality Gate Reliability Security Code Corevage lerna Twitter

  • About
  • Getting Started
  • Packages
  • Concept
  • How Does It Work
  • List of supported browsers
  • Contribute
  • Roadmap

About

A set of independent components. Awesome library based on HTML and CSS using BEM convention with the JavaScript ReactJS implementation. Each component is autonomous and extensible. Pick and use only what you need!

How React-toolkit does CSS isolation?

Only by using BEM (Block Element Modifier) CSS convention. No need for intricate technologies, just pragmatism.

Components are simple to use (just drag and drop it), simple to customize (by using CSS modifier) to your own need. Each component may evaluate internally (HTML, CSS, JS) and minimize any impact on your application.

You can easily build a new app from scratch or integrate some components into an existing application.

html+css documentation website react storybook website

Getting Started

You can either install everything and use only what you need. If you do that you will be able to use tree shaking to have a smaller bundle. However, you will need to import all the styles and not only the style related to your component.

npm install @axa-fr/react-toolkit-all --save
import React from 'react';

// Load only the component alert (smaller bundle size)
import { Alert } from '@axa-fr/react-toolkit-all/component/alert';

// Load all the toolkit (bigger bundle size)
import { Alert } from '@axa-fr/react-toolkit-all';

import '@axa-fr/react-toolkit-all/dist/style/af-toolkit-core.scss';

const MyAlertComponent = () => <Alert icon="ok" title="This is an alert" />;

Or you can install only the components you need:

npm install @axa-fr/react-toolkit-alert --save
import React from 'react';
import Alert from '@axa-fr/react-toolkit-alert';
import '@axa-fr/react-toolkit-alert/dist/alert.scss';

const MyAlertComponent = () => <Alert icon="ok" title="This is an alert" />;

Packages

  • @axa-fr/react-toolkit-all npm version
  • @axa-fr/react-toolkit-action npm version
  • @axa-fr/react-toolkit-alert npm version
  • @axa-fr/react-toolkit-badge npm version
  • @axa-fr/react-toolkit-button npm version
  • @axa-fr/react-toolkit-collapse npm version
  • @axa-fr/react-toolkit-core npm version
  • @axa-fr/react-toolkit-form-core npm version
  • @axa-fr/react-toolkit-form-filter npm version
  • @axa-fr/react-toolkit-form-filter-inline npm version
  • @axa-fr/react-toolkit-form-input-card npm version
  • @axa-fr/react-toolkit-form-input-checkbox npm version
  • @axa-fr/react-toolkit-form-input-choice npm version
  • @axa-fr/react-toolkit-form-input-date npm version
  • @axa-fr/react-toolkit-form-input-file npm version
  • @axa-fr/react-toolkit-form-input-number npm version
  • @axa-fr/react-toolkit-form-input-pass npm version
  • @axa-fr/react-toolkit-form-input-radio npm version
  • @axa-fr/react-toolkit-form-input-select npm version
  • @axa-fr/react-toolkit-form-input-select-multi npm version
  • @axa-fr/react-toolkit-form-input-slider npm version
  • @axa-fr/react-toolkit-form-input-switch npm version
  • @axa-fr/react-toolkit-form-input-text npm version
  • @axa-fr/react-toolkit-form-input-textarea npm version
  • @axa-fr/react-toolkit-form-steps npm version
  • @axa-fr/react-toolkit-form-summary npm version
  • @axa-fr/react-toolkit-help npm version
  • @axa-fr/react-toolkit-highlight npm version
  • @axa-fr/react-toolkit-icon npm version
  • @axa-fr/react-toolkit-layout-footer npm version
  • @axa-fr/react-toolkit-layout-footer-client npm version
  • @axa-fr/react-toolkit-layout-header npm version
  • @axa-fr/react-toolkit-link npm version
  • @axa-fr/react-toolkit-list npm version
  • @axa-fr/react-toolkit-loader npm version
  • @axa-fr/react-toolkit-modal-boolean npm version
  • @axa-fr/react-toolkit-modal-default npm version
  • @axa-fr/react-toolkit-panel npm version
  • @axa-fr/react-toolkit-popover npm version
  • @axa-fr/react-toolkit-restitution npm version
  • @axa-fr/react-toolkit-status npm version
  • @axa-fr/react-toolkit-table npm version
  • @axa-fr/react-toolkit-tabs npm version
  • @axa-fr/react-toolkit-title npm version

Concept

Each component should be autonomous (HTML + CSS + JS) and extensible.

How Does It Work

  • HTML/CSS :

    • BEM convention is used in order to break CSS cascading problem
    • SCSS and CSS files are avalaible for every component and can be overrided or extended
    • HTML/CSS Documentation
  • React :

    • Components are stateless by default
    • Some Higher-Order Components (HOC) are stateful but feel free to use the stateless one if it fits your use case
    • React documentation

List of supported browsers

Here is the list of browsers we tested this toolkit on:

  • Chrome 84+
  • Firefox 79+
  • Microsoft Edge 85+
  • Internet Explorer 11
  • Safari 13.1+
  • Opera 71+

Contribute

  • How to run the solution and to contribute
  • Please respect our code of conduct

Roadmap

  • Update general documentation
  • Migrating to TypeScript all components
  • Fix the issues and clean code. Make it simpler, faster, lighter