Skip to content

Getting started

Install a country package and a framework adapter:

Terminal window
npm install @road-signs/us @road-signs/react
import { getSign } from '@road-signs/us';
import { RoadSign } from '@road-signs/react';
const sign = getSign('w1-1-turn');
export default function App() {
return <RoadSign sign={sign} size={64} />;
}

Every sign has a slug ID derived from its code and name: {code-lowercase}-{name-slugified}, e.g. w1-1-turn.

Browse all signs in the Sign Gallery — the code is shown below each card.

You can also look up signs programmatically:

import { signs, getSign, getSignByCode, getSignsByCategory } from '@road-signs/us';
// All signs
signs;
// By slug ID
getSign('w1-1-turn');
// By MUTCD code
getSignByCode('W1-1');
// By category
getSignsByCategory('warning');

All packages ship full TypeScript types. Country packages narrow the category field to their specific union:

import type { USSign, USCategory } from '@road-signs/us';
import type { Sign } from '@road-signs/core';