Reusable front-end components and styles used to build digital policing products and services.
It provides a shared visual language (layout, brand, responsive behaviour, dark mode) and a multi-runtime component API (aspComponent) for Nunjucks, Twig, and Razor.
See live examples and guidance on when to use components in the ASP Digital Design System.
aspComponent contract via src/component-manifest.json@policedigitalservices/asp-frontend), NuGet (AspFrontend), and CDN assets.nvmrc in the repository for the CI version)src/dotnet/ development and tests)Clone and install:
git clone https://github.com/policedigitalservices/asp-frontend.git
cd asp-frontend
npm install
npm run start
Consuming apps typically depend on the published packages or CDN build rather than cloning for production use.
Node / Formation-style apps:
const { registerAspComponentNunjucks } = require('@policedigitalservices/asp-frontend');
registerAspComponentNunjucks(nunjucksEnv);
PHP / Timber: enable src/php/timber-twig-asp-component.php via Composer, then use aspComponent in Twig.
Razor / .NET: install the AspFrontend NuGet package from GitHub Packages, call .AddAspFrontend() in Program.cs, then @await Html.AspComponentAsync(...).
Macro imports via the components/*/macro.njk pattern remain supported.
master are automated by semantic-release — do not bump versions or npm publish locally for normal releasesASP_CDN_URL and ASP_CDN_VERSION (see WP Blocks)Current package version: 2.19.1 (see changelog).
In-house applications and microsites that share the design system look and feel, including (non-exhaustive):
> TODO: Add content.
> TODO: Add content.