Thailand (TH)
Quick facts
Section titled “Quick facts”| Field | Value |
|---|---|
| Drive side | Left-hand |
| Language(s) | Thai |
| Regulator | DOH |
| Standard | Land Traffic Act (พระราชบัญญัติจราจรทางบก) |
The @road-signs/th package contains Thailand road signs from the Land Traffic Act (พระราชบัญญัติจราจรทางบก).
Signs are sourced from Wikimedia Commons and are in the public domain.
Installation
Section titled “Installation”npm install @road-signs/thSign categories
Section titled “Sign categories”| Category | Series | Description |
|---|---|---|
warning |
Warning | ป้ายเตือน — hazard warnings |
prohibitory |
Regulatory | ป้ายบังคับ — regulatory and prohibitory signs |
mandatory |
Instruction | ป้ายบังคับ (คำสั่ง) — mandatory instruction signs |
information |
Guide | ป้ายแนะนำ — guide and information signs |
import { signs, getSign, getSignByCode, getSignsByCategory } from '@road-signs/th';
// Example below uses the real TH sign "E85" — adjust to taste.
// All signssigns.length;
// By slug IDconst sign = getSign("e85-gasoline");
// By sign codeconst s = getSignByCode("E85");
// All information signsconst filtered = getSignsByCategory("information");import { getSignsByCategory } from '@road-signs/th';import { RoadSign } from '@road-signs/react';
const informationSigns = getSignsByCategory("information");
export default function THGrid() { 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/th';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 | 445 |
| Signs with SVG | 445 |
| Missing SVG | 0 |
| Overall | 100% |
| Category | Scraped | With SVG | Missing | % |
|---|---|---|---|---|
warning |
134 | 134 | 0 | 100% |
priority |
5 | 5 | 0 | 100% |
prohibitory |
111 | 111 | 0 | 100% |
mandatory |
39 | 39 | 0 | 100% |
information |
156 | 156 | 0 | 100% |
Standard: Land Traffic Act (พระราชบัญญัติจราจรทางบก)
SVG sources:
Coverage data is also published in the @road-signs/docs package.
TypeScript types
Section titled “TypeScript types”import type { THSign, THCategory } from '@road-signs/th';
type THCategory = 'information' | 'mandatory' | 'prohibitory' | 'warning';
interface THSign { id: string; // e.g. "w1-sharp-bend" code: string; // sign code, e.g. "W1" name: string; description: string; category: THCategory; svg: string; // inline SVG string assets: { svg: string; png: Record<number, string>; jpg: Record<number, string>; webp: Record<number, string>; };}