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
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.12 sites report using this module
- Created by prudloff on , updated
Stable 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 8 Mar 2025 at 16:37 UTC

