MpDS TextField
React component for faster and simpler web development.
Installation
MpDS TextField is available as an npm package.
// with npm
npm install mpds-textfield-f3m
Usage
Here is a quick example to get you started, it's all you need:
import * as React from "react";
import MpdsTextfield from "mpds-textfield-f3m"
function App() {
return <MpdsTextfield labelText="Name" widthOfTextfield="250px"></MpdsTextfield>
}
ReactDOM.render(<App />, document.querySelector('#app'));
Props
Name | Description | Default |
---|
classes
|
Classes in the root of the textfield.
|
-
|
id
|
Id of the textfield.
|
-
|
inputLabelProps
|
Props applied to the InputLabel element. (Check Material UI TextField API for more information).
Partial<InputLabelProps>
|
-
|
labelText
*
|
The label content.
|
-
|
placeholder
|
The short hint displayed in the input before the user enters a value.
|
-
|
onChangeInput
|
Callback fired when the value is changed.
((event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void)
|
-
|
defaultValueInput
|
The default value of the input.
|
-
|
widthOfTextfield
|
The width value of the input.
|
200px
|
Yes, it's really all you need to get started! Try it in:
[CodeSandbox](https://codesandbox.io/)
License
No License. "(...) nobody else can copy, distribute, or modify your work without being at risk of take-downs, shake-downs, or litigation."