msb-react-input
v1.0.3
Published
``` import MsbInput from "msb-react-input";
Downloads
3
Maintainers
Readme
msb-react-input
import MsbInput from "msb-react-input";
function App() {
const [password, setPassword] = useState('');
return (
<div className="App">
<MsbInput type="password" id="password" name="password"
placeholder="Your password.."
onChange={(e)=>setPassword(e.target.value)}
value={password} required={true}
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
errorPatternMessage="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters"
/>
</div>
);
}
export default App;
npm Install
npm msb-react-input
yarn Install
yarn msb-react-input
Typescript
"dependencies": {
"react": "^17.0.2",
"typescript": "^4.8.4"
},
"devDependencies": {
"@types/react": "^17.0.2"
}