Taiwan (TW)
Quick facts
Section titled “Quick facts”| Field | Value |
|---|---|
| Drive side | Right-hand |
| Language(s) | Mandarin |
| Regulator | MOTC Taiwan |
| Standard | Road Traffic Safety Rules (道路交通標誌標線號誌設置規則) |
The @road-signs/tw package contains Taiwan road signs from the Road Traffic Safety Rules (道路交通標誌標線號誌設置規則).
Signs are sourced from Wikimedia Commons and are in the public domain.
Installation
Section titled “Installation”npm install @road-signs/twSign categories
Section titled “Sign categories”| Category | Series | Description |
|---|---|---|
warning |
Warning | 警告標誌 — hazard warnings |
prohibitory |
Regulatory | 禁制標誌 — prohibitory and regulatory signs |
mandatory |
Instruction | 指示標誌 — mandatory instruction signs |
information |
Guide | 指引標誌 — guide and information signs |
import { signs, getSign, getSignByCode, getSignsByCategory } from '@road-signs/tw';
// Example below uses the real TW sign "A1" — adjust to taste.
// All signssigns.length;
// By slug IDconst sign = getSign("a1-taiwan-roc-road-sign");
// By sign codeconst s = getSignByCode("A1");
// All warning signsconst filtered = getSignsByCategory("warning");import { getSignsByCategory } from '@road-signs/tw';import { RoadSign } from '@road-signs/react';
const warningSigns = getSignsByCategory("warning");
export default function TWGrid() { return ( <div style={{ display: 'flex', gap: 8, flexWrap: 'wrap' }}> {warningSigns.map((sign) => ( <RoadSign key={sign.id} sign={sign} size={64} /> ))} </div> );}<script setup>import { getSignsByCategory } from '@road-signs/tw';import { RoadSign } from '@road-signs/vue';
const warningSigns = getSignsByCategory("warning");</script>
<template> <div style="display:flex;gap:8px;flex-wrap:wrap"> <RoadSign v-for="sign in warningSigns" :key="sign.id" :sign="sign" :size="64" /> </div></template>Coverage
Section titled “Coverage”| Metric | Value |
|---|---|
| Signs scraped | 215 |
| Signs with SVG | 215 |
| Missing SVG | 0 |
| Overall | 100% |
| Category | Scraped | With SVG | Missing | % |
|---|---|---|---|---|
warning |
17 | 17 | 0 | 100% |
priority |
8 | 8 | 0 | 100% |
prohibitory |
35 | 35 | 0 | 100% |
mandatory |
40 | 40 | 0 | 100% |
information |
115 | 115 | 0 | 100% |
Standard: Road Traffic Safety Rules (道路交通標誌標線號誌設置規則)
SVG sources:
Coverage data is also published in the @road-signs/docs package.
TypeScript types
Section titled “TypeScript types”import type { TWSign, TWCategory } from '@road-signs/tw';
type TWCategory = 'information' | 'mandatory' | 'prohibitory' | 'warning';
interface TWSign { id: string; // e.g. "w1-sharp-bend" code: string; // sign code, e.g. "W1" name: string; description: string; category: TWCategory; svg: string; // inline SVG string assets: { svg: string; png: Record<number, string>; jpg: Record<number, string>; webp: Record<number, string>; };}