Skip to content

tunganh-phamba/react-license-plate

 
 

Repository files navigation

react-license-plate

A simple React component that visualizes a european (for now) license plate with the flag, country code and license plate number (id).

How to use

npm install react-license-plate

You can now import react-license-plate like so:

import LicensePlate from 'react-license-plate'
...

Available props

interface ILicensePlateProps {
  plateColor?: string;
  countryCode: string;
  countryCodeColor?: string;
  plateId: string;
  height: number;
}
Prop Default Value
plateColor #fff HEX
countryCode max. 3 characters
countryCodeColor #fff HEX
plateId Text
height px

Examples

Code:

<LicensePlate countryCode="D" plateId="KA-PA 777" height={150} />

Result:

Example One

Code:

<LicensePlate
  plateColor="orange"
  countryCode="NL"
  plateId="KA-PA 777"
  height={150}
/>

Result:

Example Two

About

A library for displaying license plates.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 60.5%
  • SCSS 23.2%
  • JavaScript 16.3%