react-dsfr
GitHubComponentsPlayground
  • πŸ”§Initial setup
  • πŸ”€Integration with routing libs
  • 🦺Class names type safety
  • 🎨Colors
  • 🧩Components
  • β˜‘οΈIcons
  • πŸ’…CSS in JS
  • 🌎Internationalization
  • πŸŒ…Importing assets
  • 🀝MUI integration
  • πŸ•ŠοΈCustom Branding
  • πŸ“–Storybook
  • πŸ“ŠAnalytics
  • πŸ”’Content-Security-Policy
  • πŸ“¦Publishing a NPM modules that depends on react-dsfr
  • πŸ’ŸContributing
Powered by GitBook
LogoLogo

Links

  • GitHub
  • Playground
  • Components

2022-2023 PΓ΄le logiciel libre d'Etalab - MIT license

On this page

Was this helpful?

Export as PDF

Custom Branding

Remove the governmental branding and apply your own theme.

PreviousMUI integrationNextStorybook

Last updated 25 days ago

Was this helpful?

By default, applications built with this toolkit must be deployed on a `.gouv.fr` domain.

Using the DSFR outside that context requires an official agreement.

But what if you want to open your app to other use cases?

React-DSFR allows you to white-label your application, and even apply a custom MUI theme dynamically, simply by changing a configuration value.

Here’s a video tutorial that shows how to leverage this feature:

You can find the template project used in the tutorial here:

Bonus tip:

If you want to change the environment variable that defines the active theme **without rebuilding** (in Vite projects), you’ll find this tool very useful:

πŸ•ŠοΈ
GitHub - InseeFrLab/vite-insee-starter: A template project for SPAsGitHub
GitHub - garronej/vite-envs: βš™οΈ Env var in Vite at container startupGitHub
Logo
Logo