WanaKanaReact
React wrapper for WanaKana.js
Example demo
https://wanakanareact.netlify.com
To do
- Add ability to use a custom component
Different options
// default - romaji to kana<WanakanaInput ="konnnichiwa" /> // kana to romaji<WanakanaInput ="romaji" ="こんにちわ" /> // romaji to hiragana<WanakanaInput ="hiragana" ="konnnichiwa" /> // romaji to katakana<WanakanaInput ="katakana" ="TABERU" />
Useful props
Name | Value |
---|---|
to | kana (default), romaji , hiragana , katakana |
component | any valid dom element (input , textarea , etc) |
To use in a form
import WanakanaInput from 'react-wanakana'; const WanakanaInput = const greeting setGreeting = ; const handleChange = { ; }; return <form = > <WanakanaInput ="greeting" = = /> <button ="submit">Submit</button> </form> ;;
To develop in storybook
npm run storybook