Brazil (BR)
Quick facts
Section titled “Quick facts”| Field | Value |
|---|---|
| Drive side | Right-hand |
| Language(s) | Portuguese |
| Regulator | CONTRAN (CTB) |
| Code format | A-1a / R-1 / I-1 |
| Standard | CTB (Código de Trânsito Brasileiro) — Vienna Convention variant |
The @road-signs/br package contains Brazil road signs from the Código de Trânsito Brasileiro (CTB), Brazil’s national traffic code.
Signs are sourced from Wikipedia / Wikimedia Commons. Signs are in the public domain.
Installation
Section titled “Installation”npm install @road-signs/brSign categories
Section titled “Sign categories”| Category | Series | Description |
|---|---|---|
warning |
A-xx | Advertência — diamond hazard warnings |
priority |
— | Give way / stop |
prohibitory |
R-xx | Regulamentação — regulatory signs |
mandatory |
— | Compulsory actions |
information |
D-xx / S-xx | Indicação / Serviço signs |
import { signs, getSign, getSignByCode, getSignsByCategory } from '@road-signs/br';
// Example below uses the real BR sign "A-1A" — adjust to taste.
// All signssigns.length;
// By slug IDconst sign = getSign("a-1a-sharp-curve-to-left");
// By sign codeconst s = getSignByCode("A-1A");
// All warning signsconst filtered = getSignsByCategory("warning");import { getSignsByCategory } from '@road-signs/br';import { RoadSign } from '@road-signs/react';
const warningSigns = getSignsByCategory("warning");
export default function BRGrid() { 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/br';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 | 171 |
| Signs with SVG | 171 |
| Missing SVG | 0 |
| Overall | 100% |
| Category | Scraped | With SVG | Missing | % |
|---|---|---|---|---|
warning |
104 | 104 | 0 | 100% |
priority |
0 | 0 | 0 | — |
prohibitory |
67 | 67 | 0 | 100% |
mandatory |
0 | 0 | 0 | — |
information |
0 | 0 | 0 | — |
Standard: CTB (Código de Trânsito Brasileiro) — Vienna Convention variant
SVG sources:
Coverage data is also published in the @road-signs/docs package.
TypeScript types
Section titled “TypeScript types”import type { BRSign, BRCategory } from '@road-signs/br';
type BRCategory = 'information' | 'mandatory' | 'priority' | 'prohibitory' | 'warning';
interface BRSign { id: string; // e.g. "a-1-curves-ahead" code: string; // e.g. "A-1" name: string; description: string; category: BRCategory; svg: string; // inline SVG string assets: { svg: string; png: Record<number, string>; jpg: Record<number, string>; webp: Record<number, string>; };}