Japan (JP)
Quick facts
Section titled “Quick facts”| Field | Value |
|---|---|
| Drive side | Left-hand |
| Language(s) | Japanese |
| Regulator | National Police Agency |
| Code format | 101 / 201 / 301 |
| Standard | Road Traffic Law (道路交通法) |
The @road-signs/jp package contains Japan road signs from the Road Traffic Law (道路交通法), Japan’s national road traffic legislation.
Signs are sourced from Wikipedia / Wikimedia Commons. Signs are in the public domain.
Installation
Section titled “Installation”npm install @road-signs/jpSign categories
Section titled “Sign categories”| Category | Series | Description |
|---|---|---|
warning |
2xx | 警戒標識 — hazard warnings |
prohibitory |
1xx | 規制標識 — regulatory signs |
mandatory |
3xx | 指示標識 — instruction signs |
information |
4xx | 案内標識 — guide signs |
import { signs, getSign, getSignByCode, getSignsByCategory } from '@road-signs/jp';
// Example below uses the real JP sign "E1" — adjust to taste.
// All signssigns.length;
// By slug IDconst sign = getSign("e1-expressway-number-tomei");
// By sign codeconst s = getSignByCode("E1");
// All information signsconst filtered = getSignsByCategory("information");import { getSignsByCategory } from '@road-signs/jp';import { RoadSign } from '@road-signs/react';
const informationSigns = getSignsByCategory("information");
export default function JPGrid() { 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/jp';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 | 126 |
| Signs with SVG | 126 |
| Missing SVG | 0 |
| Overall | 100% |
| Category | Scraped | With SVG | Missing | % |
|---|---|---|---|---|
warning |
36 | 36 | 0 | 100% |
priority |
0 | 0 | 0 | — |
prohibitory |
59 | 59 | 0 | 100% |
mandatory |
13 | 13 | 0 | 100% |
information |
18 | 18 | 0 | 100% |
Standard: Road Traffic Law (道路交通法)
SVG sources:
Coverage data is also published in the @road-signs/docs package.
TypeScript types
Section titled “TypeScript types”import type { JPSign, JPCategory } from '@road-signs/jp';
type JPCategory = 'information' | 'mandatory' | 'priority' | 'prohibitory' | 'warning';
interface JPSign { id: string; // e.g. "201-dangerous-bend" code: string; // e.g. "201" name: string; description: string; category: JPCategory; svg: string; // inline SVG string assets: { svg: string; png: Record<number, string>; jpg: Record<number, string>; webp: Record<number, string>; };}