Component Input mapping lvgl lv_textarea)
- Input Component is One line mode lv_textarea
- virtual keyboard will auto raise up when focus on Input component
Component Input support controlled mode, achieve by onChange and value props
import { Input } from 'lvlgjs-ui'
import { useState } from 'react'
function Component () {
const [value, setValue] = useState()
return (
<React.Fragment>
{/* controlled */}
<Input
style={style.input}
onFocus={() => console.log('focus')}
onFocusStyle={style.onFocusStyle}
onChange={(e) => setValue(e.value)}
mode="password"
value={value}
/>
{/* not controlled */}
<Input
style={style.input}
onFocus={() => console.log('focus')}
onFocusStyle={style.onFocusStyle}
mode="password"
/>
</React.Fragment>
)
}
const style = {
input: {},
onFocusStyle: {}
}
test/textarea/1