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