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

1.0.0 • Public • Published

react-web-input-field-with-label

Input field with label and validation error messages for the web, 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

VersionDownloads (Last 7 Days)Tag
1.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.00

Package Sidebar

Install

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

Weekly Downloads

0

Version

1.0.0

License

AGPL-3.0

Unpacked Size

47 kB

Total Files

16

Last publish

Collaborators

  • danfredriksen