China (CN)
Quick facts
Section titled “Quick facts”| Field | Value |
|---|---|
| Drive side | Right-hand |
| Language(s) | Chinese |
| Regulator | MPS (GB 5768) |
| Standard | GB 5768 national standard (non-Vienna) |
The @road-signs/cn package contains China road signs from the GB standard (non-Vienna).
Signs are sourced from Wikimedia Commons and are in the public domain.
Installation
Section titled “Installation”npm install @road-signs/cnSign categories
Section titled “Sign categories”| Category | Series | Description |
|---|---|---|
warning |
Warning | Hazard and warning signs |
prohibitory |
Prohibitory | Prohibition and restriction signs |
mandatory |
Mandatory | Mandatory instruction signs |
information |
Indicative / Informational | Information and directional signs |
import { signs, getSign, getSignByCode, getSignsByCategory } from '@road-signs/cn';
// Example below uses the real CN sign "S9" — adjust to taste.
// All signssigns.length;
// By slug IDconst sign = getSign("s9-provincial-highway-sign-with-name-below-should-not-be-changjia-g1521");
// By sign codeconst s = getSignByCode("S9");
// All information signsconst filtered = getSignsByCategory("information");import { getSignsByCategory } from '@road-signs/cn';import { RoadSign } from '@road-signs/react';
const informationSigns = getSignsByCategory("information");
export default function CNGrid() { return ( <div style={{ display: 'flex', gap: 8, flexWrap: 'wrap' }}> {informationSigns.map((sign) => ( <RoadSign key={sign.id} sign={sign} size={64} /> ))} </div> );}<script setup>import { getSignsByCategory } from '@road-signs/cn';import { RoadSign } from '@road-signs/vue';
const informationSigns = getSignsByCategory("information");</script>
<template> <div style="display:flex;gap:8px;flex-wrap:wrap"> <RoadSign v-for="sign in informationSigns" :key="sign.id" :sign="sign" :size="64" /> </div></template>Coverage
Section titled “Coverage”| Metric | Value |
|---|---|
| Signs scraped | 429 |
| Signs with SVG | 290 |
| Missing SVG | 139 |
| Overall | 68% |
| Category | Scraped | With SVG | Missing | % |
|---|---|---|---|---|
warning |
87 | 76 | 11 | 87% |
priority |
0 | 0 | 0 | — |
prohibitory |
52 | 51 | 1 | 98% |
mandatory |
0 | 0 | 0 | — |
information |
290 | 163 | 127 | 56% |
Standard: GB 5768 national standard (non-Vienna)
SVG sources:
Coverage data is also published in the @road-signs/docs package.
TypeScript types
Section titled “TypeScript types”import type { CNSign, CNCategory } from '@road-signs/cn';