Turkey (TR)
Quick facts
Section titled “Quick facts”| Field | Value |
|---|---|
| Drive side | Right-hand |
| Language(s) | Turkish |
| Regulator | KGM |
| Standard | Karayolları Trafik Yönetmeliği — Vienna Convention variant |
The @road-signs/tr package contains Turkish road signs from the Karayolları Trafik Yönetmeliği — Vienna Convention variant.
Signs are sourced from Wikimedia Commons and are in the public domain.
Installation
Section titled “Installation”npm install @road-signs/trSign categories
Section titled “Sign categories”| Category | Series | Description |
|---|---|---|
warning |
Warning | Tehlike işaretleri — hazard warnings |
prohibitory |
Regulatory | Yasaklayıcı işaretler — regulatory and prohibitory signs |
mandatory |
Instruction | Zorunluluk işaretleri — mandatory instruction signs |
information |
Guide | Bilgi işaretleri — guide and information signs |
import { signs, getSign, getSignByCode, getSignsByCategory } from '@road-signs/tr';
// Example below uses the real TR sign "curve-to-the-right" — adjust to taste.
// All signssigns.length;
// By slug IDconst sign = getSign("curve-to-the-right-curve-to-the-right");
// By sign codeconst s = getSignByCode("curve-to-the-right");
// All warning signsconst filtered = getSignsByCategory("warning");import { getSignsByCategory } from '@road-signs/tr';import { RoadSign } from '@road-signs/react';
const warningSigns = getSignsByCategory("warning");
export default function TRGrid() { 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/tr';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 | 155 |
| Signs with SVG | 155 |
| Missing SVG | 0 |
| Overall | 100% |
| Category | Scraped | With SVG | Missing | % |
|---|---|---|---|---|
warning |
50 | 50 | 0 | 100% |
priority |
0 | 0 | 0 | — |
prohibitory |
39 | 39 | 0 | 100% |
mandatory |
21 | 21 | 0 | 100% |
information |
45 | 45 | 0 | 100% |
Standard: Karayolları Trafik Yönetmeliği — Vienna Convention variant
SVG sources:
Coverage data is also published in the @road-signs/docs package.
TypeScript types
Section titled “TypeScript types”import type { TRSign, TRCategory } from '@road-signs/tr';
type TRCategory = 'information' | 'mandatory' | 'prohibitory' | 'warning';
interface TRSign { id: string; // e.g. "a1-sharp-bend" code: string; // sign code, e.g. "A1" name: string; description: string; category: TRCategory; svg: string; // inline SVG string assets: { svg: string; png: Record<number, string>; jpg: Record<number, string>; webp: Record<number, string>; };}