@source4society/react-input-field-with-label

1.0.0 • Public • Published

react-input-field-with-label

Input field with label and validation error messages, useful with redux-form.

scepter-logo

redux-logo

react-boilerplate

airbnb-codestyle

Build Status

codecov

Installation

npm install @source4society/react-input-field-with-label

or

yarn add @source4society/react-input-field-with-label

Usage

If you have a redux-form setup, and you are using the Field component, you can pass this in as the component prop as follows:

<Field labelText="Your label text here" name="fieldName" id="fieldId" component={InputFieldWithLabel} type="email" />

The different props are as follows:

labelText // Defines the text used in the label
labelClasses // Add custom label classes to the label
labelAttributes // Attributes for the label tag, such as `for`
input // The input field object, provided by redux-form
type  // The type of input field, defaults to text
className // Custom class for the entire component
meta: // an object containing the 'touched' and 'error' properties, supplied by redux-form
readOnly: // Whether or not the form is readOnly

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    2

Package Sidebar

Install

npm i @source4society/react-input-field-with-label

Weekly Downloads

2

Version

1.0.0

License

AGPL-3.0

Unpacked Size

93.1 kB

Total Files

27

Last publish

Collaborators

  • danfredriksen