Mexico (MX)
Quick facts
Section titled “Quick facts”| Field | Value |
|---|---|
| Drive side | Right-hand |
| Language(s) | Spanish |
| Regulator | SCT |
| Code format | SR-1 / SP-1 / SI-1 |
| Standard | SCT (Secretaría de Comunicaciones y Transportes) — Vienna Convention variant |
The @road-signs/mx package contains Mexican road signs from the SCT (Secretaría de Comunicaciones y Transportes).
Signs are sourced from Wikimedia Commons and are in the public domain.
Installation
Section titled “Installation”npm install @road-signs/mxSign categories
Section titled “Sign categories”| Category | Series | Description |
|---|---|---|
warning |
Preventivas | Hazard warnings |
prohibitory |
Restrictivas | Prohibitions and restrictions |
information |
Informativas | Information and direction |
import { signs, getSign, getSignByCode, getSignsByCategory } from '@road-signs/mx';
// Example below uses the real MX sign "SP-6A" — adjust to taste.
// All signssigns.length;
// By slug IDconst sign = getSign("sp-6a-curve-left");
// By sign codeconst s = getSignByCode("SP-6A");
// All warning signsconst filtered = getSignsByCategory("warning");import { getSignsByCategory } from '@road-signs/mx';import { RoadSign } from '@road-signs/react';
const warningSigns = getSignsByCategory("warning");
export default function MXGrid() { 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/mx';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 | 317 |
| Signs with SVG | 315 |
| Missing SVG | 2 |
| Overall | 99% |
| Category | Scraped | With SVG | Missing | % |
|---|---|---|---|---|
warning |
86 | 86 | 0 | 100% |
priority |
0 | 0 | 0 | — |
prohibitory |
80 | 80 | 0 | 100% |
mandatory |
0 | 0 | 0 | — |
information |
151 | 149 | 2 | 99% |
Standard: SCT (Secretaría de Comunicaciones y Transportes) — Vienna Convention variant
SVG sources:
Coverage data is also published in the @road-signs/docs package.
TypeScript types
Section titled “TypeScript types”import type { MXSign, MXCategory } from '@road-signs/mx';
type MXCategory = 'information' | 'prohibitory' | 'warning';
interface MXSign { id: string; // e.g. "p1-sharp-bend" code: string; // sign code, e.g. "P-1" name: string; description: string; category: MXCategory; svg: string; // inline SVG string assets: { svg: string; png: Record<number, string>; jpg: Record<number, string>; webp: Record<number, string>; };}