React 實現的車牌鍵盤

vehicle-plate-keyboard

React 實現的車牌鍵盤。css

https://github.com/LiuuY/vehicle-plate-keyboardgit

💡 Features

  • 省份 + 字母/數字 + '港澳學警領'
  • 新能源車牌
  • 自動判斷當前位置可輸入字符類型

🚗 Demo

Demogithub

Demo

📷 Screenshots

1

2

3

📦 Installation

yarn add vehicle-plate-keyboard

🔨 Usage

import LicenseKeyboard from 'vehicle-plate-keyboard';
import 'vehicle-plate-keyboard/dist/main.css';

...

<LicenseKeyboard
   visible={state.showKeyboard}
   onChange={value => setState({ value })}
   value={state.value}
   done={() => setState({ showKeyboard: false })}
/>

🗺 API

props type description
visiable boolean keyboard visible
onChange (value: string) => void trigger when user tap
value string controlled value
done () => void trigger when keyborad dismiss
confirmButtonStyle React.CSSProperties confirm button style
confirmButtonText string confirm button text
cellTextStyle React.CSSProperties keycell style
safeArea boolean show safearea

📝 License

MIT Licensespa

相關文章
相關標籤/搜索