1.1.2 • Published 3 years ago

react-persian-input v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

react-persian-input

Full customizable outlined text input for right to left languages.

Installation

Open a Terminal in your project's folder and run:

npm i react-persian-input

Usage

  ...
  import {useState} from "react"
  import FaInput from "react-persian-input"
  const App = () => {
    ...
    const [inputValue,setInputValue] = useState("")
    const handleInputChange = (e) => {
      setInputValue(e.target.value)
    }
    return(
        ...
        <FaInput label="نام" value={inputValue} onInputChange={handleInputChange}/>
    )
   }

Props

PropDescriptionType:DefaultValue
labellabel of inputstring
widthwidth of inputstring
rtlinput text directionbool:false
valuevalue of text inputstring
labelStylestyle of label when it's not on focusobject
labelOnFocusStylestyle of label when it's on focusobject
borderStylestyle of border when it's not on focusobject
borderOnFocusStylestyle of border when it's on focusobject
inputStyleStyle of inputobject
moveLabelTopmove label to top when on focus (use negative number for move bottom)string:25px
moveLabelRightmove label to right when on focus (use negative number for move left)string:10px
scaleLabelscale label when of focusstring: .94
1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago