/react-toolkit

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

Primary LanguageJavaScriptMIT LicenseMIT

@axa-fr/react-toolkit

Build status Quality Gate Reliability Security Code Corevage lerna

About

A set of independent components. Awesome library based on HTML and CSS using BEM convention with a JavaScript react.js implementation. Each components are autonomous and extensible. Pick and use only what you need!

How is done css isolation?

Only by using BEM (Block Element Modifier) css convention. No need of a intricate technologies, just pragatism.

Component are simple to use (just drag and drog it), simple to customise (by using css modifier) to your own need. Each Components may evoluate internally (html, css, js) minimizing the impact on your application.

You can easily build a new app from scratch or integrate component into existing application.

html+css documentation website react storybook website

Getting Started

Install what you need

npm install @axa-fr/react-toolkit-alert --save

Use only what you need

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="Les caves et les garages situés dans le même corps de bâtiment que le logement assuré sont garantis d′office"
  />
)

Packages

Concept

Each component should be autonomous (html + css + javascript) and extensible.

How It Works

  • Html/Css :

    • BEM convention is used in order to break css cascading problem
    • Scss and css files are avalaible by component and can be overrided or extended
    • Html/Css Documentation
  • React :

    • Components are without state by default
    • Some higher component level are statefull but feel free to use the stateless one if it not feet to your use case
    • React documentation

Contribute

Roadmap

  • Update general documentation
  • Continu to migrate to TypeScript component by component
  • Continu to fix and clean code. Make it simpler, faster, lighter