Component Keyboard mapping lvgl lv_keyboard)
October 15, 2022 ยท View on GitHub
It's used to realize a virtual keyboard to write texts into a Text area.
Api
Props
Usage
import { Keyboard, Input } from 'lvlgjs-ui'
import { useState, useRef } from 'react'
function Component () {
const [didMount, setDidMount] = useState(false)
const ref = useRef()
useEffect(() => {
setDidMount(true)
}, [])
return (
<React.Fragment>
<Input
ref={ref}
/>
{didMount && <Keyboard
style={style.keyboard}
textarea={ref.current}
mode={"number"}
/>}
</React.Fragment>
)
}
const style = {
keyboard: {},
}
Demo
test/keyboard