https://github.com/terrierscript/react-auto-kana
React japanese auto input kana
https://github.com/terrierscript/react-auto-kana
Last synced: 3 months ago
JSON representation
React japanese auto input kana
- Host: GitHub
- URL: https://github.com/terrierscript/react-auto-kana
- Owner: terrierscript
- Created: 2015-03-05T23:38:35.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-12T15:51:48.000Z (almost 11 years ago)
- Last Synced: 2024-04-15T12:17:43.467Z (almost 2 years ago)
- Language: JavaScript
- Homepage: http://inuscript.github.io/react-auto-kana/
- Size: 2.75 MB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Auto Kana
[](https://circleci.com/gh/suisho/react-auto-kana)
> Japanese React Kana Input Component
## Demo
[Live Demo](http://suisho.github.io/react-auto-kana/)
## Installation
```
npm install -S react-auto-kana
```
## Usage Example
```js
var React = require("react")
var AutoKana = require("react-auto-kana")
var Example = React.createClass({
getInitialState(){
return {
kana : ""
}
},
onUpdateKana(data){
this.setState({
kana : data.kana
})
//this.props.onChange(this.state)
},
onChange(e){
this.setState({
kana : e.target.value
})
},
render(){
return (
)
}
})
module.exports = Example
```
### props
- `onUpdate`
- Callback after generated kana
- `data.kana` : Generated kana value
If you want get Katakana, you can use [japanese](http://npmjs.org/japanese) module.
# Run demo localy
```
npm run example
```
# Known Issue
Core library is [here](http://github.com/suisho/historykana)
- Invalid behavior when same Kanji is input.