Skip to content

United Kingdom (UK)

Field Value
Drive side Left-hand
Language(s) English, Welsh
Regulator DfT (TSRGD 2016)
Code format Diagram 503 / 670 / 7001
Standard TSRGD (Traffic Signs Regulations and General Directions)

The @road-signs/uk package contains UK road signs as defined in the Traffic Signs Regulations and General Directions 2016 (TSRGD). Signs are identified by their TSRGD diagram numbers and sourced from Wikipedia / Wikimedia Commons. The Highway Code traffic signs guide is the authoritative reference for sign meanings and legal obligations.

Terminal window
npm install @road-signs/uk
Category TSRGD part Description
warning Part 3 Hazard warnings — triangular, red border
regulatory Part 2 Signs giving orders — circular, red/blue
direction Part 4 Route and destination signs — rectangular, colour by road type
information Part 5 Informatory signs — rectangular
temporary Part 7 Road works and temporary signs — rectangular, orange/yellow
import { signs, getSign, getSignByCode, getSignsByCategory } from '@road-signs/uk';
// Example below uses the real UK sign "300" — adjust to taste.
// All signs
signs.length;
// By slug ID
const sign = getSign("300-camping-and-caravan-site-yd-270-m-ahead");
// By sign code
const s = getSignByCode("300");
// All direction signs
const filtered = getSignsByCategory("direction");
Metric Value
Signs scraped 468
Signs with SVG 453
Missing SVG 15
Overall 97%
Category Scraped With SVG Missing %
warning 99 99 0 100%
regulatory 132 130 2 98%
direction 57 45 12 79%
information 117 117 0 100%
temporary 63 62 1 98%

Standard: TSRGD (Traffic Signs Regulations and General Directions)

SVG sources:

Coverage data is also published in the @road-signs/docs package.

import type { UKSign, UKCategory } from '@road-signs/uk';
type UKCategory = 'direction' | 'information' | 'regulatory' | 'temporary' | 'warning';
interface UKSign {
id: string; // e.g. "601-no-entry"
code: string; // TSRGD diagram number, e.g. "601"
name: string; // e.g. "No Entry"
description: string;
category: UKCategory;
svg: string; // inline SVG string
assets: {
svg: string;
png: Record<number, string>;
jpg: Record<number, string>;
webp: Record<number, string>;
};
}