Neighbourhood Party Manager
    Wondering what’s next for npm?Check out our public roadmap! »

    @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
    

    Keywords

    none

    Install

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

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    AGPL-3.0

    Unpacked Size

    93.1 kB

    Total Files

    27

    Last publish

    Collaborators

    • avatar