Sri Lanka (LK)
Quick facts
Section titled “Quick facts”| Field | Value |
|---|---|
| Drive side | Left-hand |
| Language(s) | Sinhala, Tamil, English |
| Regulator | RDA |
| Standard | British-derived (Motor Traffic Act) |
The @road-signs/lk package contains Sri Lanka road signs from the Vienna Convention (Motor Traffic Act).
Left-hand traffic. Signs are sourced from Wikimedia Commons and are in the public domain.
Installation
Section titled “Installation”npm install @road-signs/lkSign categories
Section titled “Sign categories”| Category | Series | Description |
|---|---|---|
warning |
Warning | Hazard and warning signs |
priority |
Priority | Priority and right-of-way signs |
prohibitory |
Regulatory | Regulatory and prohibition signs |
import { signs, getSign, getSignByCode, getSignsByCategory } from '@road-signs/lk';
// Example below uses the real LK sign "APR-08" — adjust to taste.
// All signssigns.length;
// By slug IDconst sign = getSign("apr-08-sri-lanka-road-sign");
// By sign codeconst s = getSignByCode("APR-08");
// All warning signsconst filtered = getSignsByCategory("warning");import { getSignsByCategory } from '@road-signs/lk';import { RoadSign } from '@road-signs/react';
const warningSigns = getSignsByCategory("warning");
export default function LKGrid() { 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/lk';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 | 184 |
| Signs with SVG | 184 |
| Missing SVG | 0 |
| Overall | 100% |
| Category | Scraped | With SVG | Missing | % |
|---|---|---|---|---|
warning |
49 | 49 | 0 | 100% |
priority |
4 | 4 | 0 | 100% |
prohibitory |
26 | 26 | 0 | 100% |
mandatory |
53 | 53 | 0 | 100% |
information |
52 | 52 | 0 | 100% |
Standard: British-derived (Motor Traffic Act)
SVG sources:
Coverage data is also published in the @road-signs/docs package.
TypeScript types
Section titled “TypeScript types”import type { LKSign, LKCategory } from '@road-signs/lk';