react-format-licenseplate
v1.0.2
Published
Render input to format a licenseplate
Maintainers
Readme
react-format-licenseplate
Render input to format a licenseplate
Install
npm install --save react-format-licenseplateUsage
import React, { useState } from 'react'
// Libraries
import ReactLicenseplate from 'react-format-licenseplate'
const App = () => {
const [licenseplate, setLicenseplate] = useState('')
return (
<ReactLicenseplate
value={licenseplate}
onChange={newValue => {
setLicenseplate(newValue)
}}
selectOnClick={true}
/>
)
}
export default AppProps
value- value to store in stateonChange- callback function for handling the changed inputselectOnClick- true for selecting the text on focus and false for default behaviour
Language support
At the moment only license plates from the Netherlands are supported, so this language is set by default
License
MIT © lennartkoelewijn
