Skip to content

isMattCoding/react-dsfr

 
 

Repository files navigation

🇫🇷 French State Design System React integration 🇫🇷

Documentation website - Playground

🗣️ Replay de l'atelier de présentation de la librairie ici.

This module is a wrapper/compatibility layer for @gouvfr/dsfr, the vanilla JS/CSS implementation of the DSFR.

For TypeScript and JavaScript projects.

This module is a product of Etalab's Free and open source software pole. I'm working full time on this project. You can expect rapid development.

🚀 Get started 🚀

@codegouvfr/react-dsfr is a TypeScript oriented library that puts high priority in providing a good integration with the JavaScript ecosystem, notably Next.js.
It's has been started in October 2022, it's a much newer initiative and although it's being actively developed, as of today, @dataesr/react-dsfr is more stable and provide a wider component coverage.
If you are working on a SPA (Create React App, Vite) @dataesr/react-dsfr is probably a more viable option at the moment.

That being said, many of @codegouvfr/react-dsfr's features can be enjoyed without migrating away from @dataesr/react-dsfr.
You can, as standalone feature:

Here is a playground to demonstrate it.

Development

Here are instructions for contributing, if you are looking to use @codegouvfr/react-dsfr heads over to the documentation page.

git clone https://github.com/codegouvfr/react-dsfr
cd react-dsfr
yarn

# Starting storybook
yarn storybook
# You can run 'npx tsc -w -p src' on another terminal for enabling hot reloading.

# Starting test apps
yarn start-cra  # For testing in in a Create React App setup
yarn start-next # For testing in a Next.js setup
yarn start-vite # For testing in a Vite setup

# Run all unit test (test/runtime):
yarn test
# Run only test/runtime/cssVariable.test.ts (for example)
npx vitest -t "Resolution of CSS variables"

# Debugging while unit testing

How to publish a new version on NPM, how to release a beta version

This repo was bootstrapped form garronej/ts-ci have a look at the documentation of this starter for understanding the lifecycle of this repo.

About

🇫🇷 DSFR React component library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 97.6%
  • JavaScript 1.7%
  • Other 0.7%