All Projects → dataesr → react-dsfr

dataesr / react-dsfr

Licence: MIT license
Non-official React components of the official french Système de Design de l'État.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to react-dsfr

Axiom React
Axiom - Brandwatch design system and React pattern library
Stars: ✭ 41 (-14.58%)
Mutual labels:  styleguide, component-library, design-system
Styleguide
The VTEX Design System and React component library.
Stars: ✭ 138 (+187.5%)
Mutual labels:  styleguide, component-library, design-system
vf-core
A (primarily CSS) framework that targets needs of life science websites and services
Stars: ✭ 16 (-66.67%)
Mutual labels:  styleguide, component-library, design-system
design-systems
A list of famous design systems, design languages and guidelines
Stars: ✭ 403 (+739.58%)
Mutual labels:  component-library, design-system
oskrhq-design-system
A mostly reasonable although opinionated approach to building responsive Digital Interfaces sharing the same anatomy.
Stars: ✭ 60 (+25%)
Mutual labels:  styleguide, design-system
nuxt-styleguide
Increase the quality and efficiency of product design and development workflows
Stars: ✭ 15 (-68.75%)
Mutual labels:  styleguide, component-library
Uiengine
Workbench for UI-driven development
Stars: ✭ 349 (+627.08%)
Mutual labels:  styleguide, design-system
Cosmos
🔭 Auth0 Design System
Stars: ✭ 512 (+966.67%)
Mutual labels:  styleguide, design-system
Sugui Design System
A design system template for the SugUI components library based on styleguidist
Stars: ✭ 17 (-64.58%)
Mutual labels:  styleguide, design-system
Vitamin Web
Decathlon Design System libraries for web applications
Stars: ✭ 70 (+45.83%)
Mutual labels:  styleguide, design-system
Awesome Design Language System
list of awesome resources about digital design system.
Stars: ✭ 69 (+43.75%)
Mutual labels:  styleguide, design-system
Css
The CSS design system that powers GitHub
Stars: ✭ 10,670 (+22129.17%)
Mutual labels:  styleguide, design-system
react-pluto
A package of small but beautiful React components from the planet, Pluto. 🔵 Get minimal components for your React based applications 😍
Stars: ✭ 17 (-64.58%)
Mutual labels:  styleguide, design-system
design-system
Nulogy Design System
Stars: ✭ 61 (+27.08%)
Mutual labels:  styleguide, design-system
core
The Pangolin.js core that drives everything.
Stars: ✭ 18 (-62.5%)
Mutual labels:  styleguide, design-system
Ugnis
Visual CSS generator for React
Stars: ✭ 249 (+418.75%)
Mutual labels:  component-library, design-system
Vue Design System
An open source tool for building UI Design Systems with Vue.js
Stars: ✭ 2,077 (+4227.08%)
Mutual labels:  component-library, design-system
Carbon Web Components
Carbon Design System variant on top of Web Components
Stars: ✭ 171 (+256.25%)
Mutual labels:  component-library, design-system
Snacks
The Instacart Component Library
Stars: ✭ 65 (+35.42%)
Mutual labels:  styleguide, component-library
Vue Styleguidist
Created from react styleguidist for Vue Components with a living style guide
Stars: ✭ 2,133 (+4343.75%)
Mutual labels:  styleguide, design-system

@dataesr/react-dsfr

Non-official React components of the official french Système de Design de l'État.

NPM JavaScript Style Guide GitHub contributors

Tests GitHub last commit semantic-release: react

Current version is using a degraded version of @gouvfr/[email protected] (new components are not yet available)

Requirements

  • node >= 14.18.x
  • npm >= 8.15.x
  • React >= 18.2.x

Installation

npm i @dataesr/react-dsfr

Generate and watch

Generate and watch dist folder containing bundles:

npm install --legacy-peer-deps
npm start

Library usage

Example page

A playground to test components

An example page is available containing all components. To launch it on your local machine, first launch watcher of the project and then:

cd example
npm install 
npm start

Use Icons

We are using remixicon.

import { Icon } from '@dataesr/react-dsfr';

<Icon
    name="ri-bubble-chart-line"
    size="lg"
    color="#f88"
    iconPosition="right"
>
    <p>I have an icon</p>
</Icon>

⚠️ CDN link of css must be added to the <head> of your website.

<link href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" rel="stylesheet">

Use Colors

Color variables are available in style/color.css. To make a new component dark theme compatible it's recommended to use variables from scheme.css in @gouvfr/dsfr project

Some components can be colored with variables (see colorFamily props) listed below:

['green-tilleul-verveine', 'green-bourgeon', 'green-emeraude', 'green-menthe', 'green-archipel', 'blue-ecume', 'blue-cumulus', 'purple-glycine', 'pink-macaron', 'pink-tuile', 'yellow-tournesol', 'yellow-moutarde', 'orange-terre-battue', 'brown-cafe-creme', 'brown-caramel', 'brown-opera', 'beige-gris-galet']

Documentation - Storybook

Storybook of the project is under construction.

Unit tests

Run all tests using react-scripts with watcher option

npm run test:dev

Release policy and package publishing

The @dataesr/react-dsfr package is published with semantic-release.

Merging code on the master branch will automatically bump the version, create a tag, produce a changelog and trigger the tests.

If new semantic commits are found (see below how to format commit) a new version of npm package is published and github pages is updated.

new patch version

git commit -m "fix: This is my fix"

new minor version

git commit -m "feat: This is my feature"

new major version

git commit -m "[subject]" -m "BREAKING CHANGE: [body]"

See Commit message formats for more details.

Accessibility

Components can be tested in Example's page App.js with @axe-core/react

npm instal --save-dev @axe-core/react

Another solution to test accessibility is CLI module https://pa11y.org/

Check configuration file .pa11y-ci

npm install -g pa11y-ci
pa11y-ci

In Chrome

npm run test:debug

Access about:inspect

See doc debugging-tests

They use react-dsfr and we like it!

Help from outside

Thanks to the internet world.

TODO

  • Limit usage of colors to colorFamilies
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].