ak-field-text v6.0.5
TextField
Provides a standard way to create a text-based form input with an associated label.
When the label is clicked, the input will receive focus as expected.
Try it out
Interact with a live demo of the ak-field-text component.
Installation
npm install ak-field-text
Using the component
Import the component in your React app as follows:
import FieldText from 'ak-field-text';
ReactDOM.render(<FieldText />, container);
TextField
Kind: global class
Properties
- textField.compact : Boolean
- textField.type : string
- textField.disabled : Boolean
- textField.required : Boolean
- textField.label : string
- textField.name : string
- textField.placeholder : string
- textField.value : string
- textField.onChange : function
new TextField()
A text based form field with an associated label.
HTML Example
<form>
<FieldText label="My form field"></FieldText>
</form>
textField.compact : Boolean
Whether to use compact sizing for the field.
Kind: instance property of TextField
Default: false
HTML Example
<FieldText compact></FieldText>
textField.type : string
The type of control to display.
Kind: instance property of TextField
Default: "text"
HTML Example
<FieldText type="password"></FieldText>
textField.disabled : Boolean
Whether the field is disabled.
Kind: instance property of TextField
Default: false
HTML Example
<FieldText disabled></FieldText>
textField.required : Boolean
Whether the field is required.
Kind: instance property of TextField
Default: false
HTML Example
<FieldText required></FieldText>
textField.label : string
The label to be rendered next to the supplied text input.
Kind: instance property of TextField
HTML Example
<FieldText label="First name"></FieldText>
textField.name : string
The name of the field, which is submitted with the form data.
Kind: instance property of TextField
HTML Example
<FieldText name="fname"></FieldText>
textField.placeholder : string
A hint to the user of what can be entered in the control.
Kind: instance property of TextField
HTML Example
<FieldText placeholder="e.g. Your name"></FieldText>
textField.value : string
The value of the input field.
Kind: instance property of TextField
textField.onChange : function
Callback to update input value
Kind: instance property of TextField
Support and feedback
We're here to help!
Let us know what you think of our components and docs, your feedback is really important for us.
Community support
Ask a question in our forum.
Check if someone has already asked the same question before.
Create a support ticket
Are you in trouble? Let us know!
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago