Overview

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.

Features

Requirements

Installation

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.

Configuration

Hosting

Tech stack

Current package version: 2.19.1 (see changelog).

Used by

In-house applications and microsites that share the design system look and feel, including (non-exhaustive):

Integrations

In house applications

Force IT

> TODO: Add content.

Third party

> TODO: Add content.

Contacts

Repositories

Resources

Changelog

Repository docs

Related