DSFR libraries
Security covered
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"
]
}
}
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.0-alpha3 | Pre-release | Drupal 11 compatibility | Nov 5, 2024 | ||
| 1.0.0-alpha2 | Pre-release | Fix typo in core CSS path | Oct 30, 2024 | ||
| 1.0.0-alpha1 | Pre-release | Oct 29, 2024 | |||
| 1.x-dev | Dev | Oct 29, 2024 |