react-license-plate
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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
  plateColor="#fff"
  countryCode="D"
  countryCodeColor="#fff"
  plateId="KA-PA 777"
  height={150}
/>

Result:

Example One

Code:

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

Result:

Example One

Package Sidebar

Install

npm i react-license-plate

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

7.7 kB

Total Files

5

Last publish

Collaborators

  • ao19