This module automatically declares components from the French State Design System (DSFR) as Drupal libraries.

Features

If you need to use a component, you can attach it to your render array like this:

$build['#attached']['library'][] = 'dsfr_libraries/checkbox';

Or declare it as a dependency of your own library:

 dependencies:
 - dsfr_libraries/checkbox

The JS and CSS from this component will then be included in the page.

Additional Requirements

The dsfr needs to be installed in web/libraries/dsfr/.

For example, you can use Asset Packagist to install it with Composer:

{
 "require": {
 "npm-asset/gouvfr--dsfr": "^1.12"
 },
 "repositories": [
 {
 "type": "composer",
 "url": "https://asset-packagist.org"
 }
 ],
 "extra": {
 "installer-paths": {
 "web/libraries/dsfr": [
 "npm-asset/gouvfr--dsfr"
 ]
 },
 "installer-types": [
 "npm-asset"
 ]
 }
}
Supporting organizations:

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • chart icon6 sites report using this module
  • Created by prudloff on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    There are currently no supported stable releases.

Releases

1.0.0-alpha3 released 5 November 2024
Works with Drupal: ^10 || ^11

Drupal 11 compatibility

Install:

Development version: 1.x-dev updated 16 Jun 2026 at 07:59 UTC