React Input UI Collection
DEMO Note: React version 16.8.0
Inspiration from codrops
Form inputs offer a great opportunity to add some subtle and interesting effects to a web page. They are elements that your user will interact with at some point and making them fun to use can enhance the experience. We are used to the default form resembling its paper counterpart but in the digital world we can be more creative
List of components :
- InputAkira
- InputIchiro
- InputJiro
- InputKuro
- InputMadoka
- InputMaterial
- InputMinoru
- InputNao
- InputSoda
- InputYoko
Example
; ; { const value setValue = ; return <InputAkira label='Akira UI' placeholder='type...' onChanhe=setValue value=value /> }
Example with custom style
If you need change style for label or input tag, just use property:
labelStyle
inputStyle
in other cases: style
className
; ; { const value setValue = ; return <InputAkira label='Akira UI' placeholder='type...' onChanhe=setValue value=value style=margin: '25px' className='custom-class' labelStyle=fontSize: '18px' inputStyle=fontSize: '21px' /> }
Example for validation field
If field not valid set property error to
true
If field valid set property error to
false
If don't need validation set property error to
null
; ; { const value setValue = ; const error setError = ; const handleChange = { ; }; const handleFocus = { ; }; const handleSubmit = { ; } return <div> <InputAkira label='Akira UI' placeholder='type...' onChange=handleChange onFocus=handleFocus value=value error=error /> <button onClick=handleSubmit>SUBMIT</button> </div> }
Example for customizing theme
Theme has 4 property:
Theme property: |
---|
activeTextColor |
focusColor |
hoverColor |
mainColor |
To change them use theme
method
; ; { const value setValue = ; const handleSetTheme = { }; return <div> <InputAkira label='Akira UI' placeholder='type...' onChanhe=setValue value=value /> <button onClick=handleSetTheme>CHANGE THEME</button> </div> }