South Africa (ZA)
Quick facts
Section titled “Quick facts”| Field | Value |
|---|---|
| Drive side | Left-hand |
| Language(s) | English, Afrikaans |
| Regulator | SARTSM |
| Standard | SARTSM (South African Road Traffic Signs Manual) |
The @road-signs/za package contains South African road signs from the SARTSM (South African Road Traffic Signs Manual).
Signs are sourced from Wikimedia Commons and are in the public domain.
Installation
Section titled “Installation”npm install @road-signs/zaSign categories
Section titled “Sign categories”| Category | Series | Description |
|---|---|---|
warning |
W series | Hazard warnings |
regulatory |
R series | Regulatory and prohibitory signs |
guidance |
G series | Guidance and information |
temporary |
T series | Temporary traffic management |
import { signs, getSign, getSignByCode, getSignsByCategory } from '@road-signs/za';
// Example below uses the real ZA sign "stop-3-way" — adjust to taste.
// All signssigns.length;
// By slug IDconst sign = getSign("stop-3-way-stop-3-way");
// By sign codeconst s = getSignByCode("stop-3-way");
// All prohibitory signsconst filtered = getSignsByCategory("prohibitory");import { getSignsByCategory } from '@road-signs/za';import { RoadSign } from '@road-signs/react';
const prohibitorySigns = getSignsByCategory("prohibitory");
export default function ZAGrid() { return ( <div style={{ display: 'flex', gap: 8, flexWrap: 'wrap' }}> {prohibitorySigns.map((sign) => ( <RoadSign key={sign.id} sign={sign} size={64} /> ))} </div> );}<script setup>import { getSignsByCategory } from '@road-signs/za';import { RoadSign } from '@road-signs/vue';
const prohibitorySigns = getSignsByCategory("prohibitory");</script>
<template> <div style="display:flex;gap:8px;flex-wrap:wrap"> <RoadSign v-for="sign in prohibitorySigns" :key="sign.id" :sign="sign" :size="64" /> </div></template>Coverage
Section titled “Coverage”| Metric | Value |
|---|---|
| Signs scraped | 322 |
| Signs with SVG | 321 |
| Missing SVG | 1 |
| Overall | 100% |
| Category | Scraped | With SVG | Missing | % |
|---|---|---|---|---|
warning |
79 | 78 | 1 | 99% |
priority |
0 | 0 | 0 | — |
prohibitory |
223 | 223 | 0 | 100% |
mandatory |
0 | 0 | 0 | — |
information |
20 | 20 | 0 | 100% |
Standard: SARTSM (South African Road Traffic Signs Manual)
SVG sources:
Coverage data is also published in the @road-signs/docs package.
TypeScript types
Section titled “TypeScript types”import type { ZASign, ZACategory } from '@road-signs/za';
type ZACategory = 'guidance' | 'regulatory' | 'temporary' | 'warning';
interface ZASign { id: string; // e.g. "w1-sharp-bend" code: string; // sign code, e.g. "W1" name: string; description: string; category: ZACategory; svg: string; // inline SVG string assets: { svg: string; png: Record<number, string>; jpg: Record<number, string>; webp: Record<number, string>; };}