1.0.0 • Published 2 years ago

volkeno-inputify v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

volkeno-inputify

Volkeno Inputify is a ReactJS module that harmonizes the management of form components.

NPM JavaScript Style Guide

Install

npm install --save volkeno-inputify

Usage

import React, { Component } from 'react'

import { Inputify } from 'volkeno-inputify'
import 'volkeno-inputify/dist/index.css'

class Example extends Component {
  render() {
    return  <Inputify
              {...props}
            />
  }
}

Configuration - Props

PropertyTypeDefaultDescription
modelstringnullInput model. Value can be 'input', 'select', 'file', 'textarea', 'toggle_switch'
inputTypestringnullInput type. Value can be 'text', 'checkbox', 'radio', 'file'
inputNamestringnullInput name property (Required)
inputValue---nullInput value property
callBackfunctionvoidThis is the method that allows you to retrieve the value of all Inputs except select
selectCallbackfunctionvoidThis is the method that allows you to retrieve the value of select
disabledbooleanfalseInput disabled property
readOnlybooleanfalseInput readonly property
placeholderstringnullInput placeholder property
selectOptionArraynullArray of select option label and value
selectPlaceholderstringnullSelect placeholder
classNamestringnullInput custom className
inputLabelstringnullInput label
inputLabelClassNamestringnullInput custom label container className
overridedIDstringnullInput custom ID value
inputHasIconbooleanfalseFlag to add icon on input
iconInInputstringnullIcon tag for example for Fontawesome ''
inputIconPositionstringnullIcon position on the Input tag. Value can be 'left' or 'right'
inputCheckboxSizeArraynullCheckbox tag size. It is an array containing the width and height values of checkbox size
inputRadioSizeArraynullRadio tag size. It is an array containing the width and height values of radio size
hasMutliplebooleanfalseDefine if has multiple files on Input file type
inputFileTypestringdefaultDefine the type of Input file. Value can be 'default' or 'dnd' (for drag and drop)
textareaRowsnumbernullTextarea rows size
textareaColsnumbernullTextarea cols size
textareaContentSizeLimitstringnullTextarea content size limit value
inputSwitchValuestringnullInput switch value property
switchCheckedStatusbooleanfalseInput switch checked proprety status
inputContainerClassNamestringnullInput switch parent container custom className
inputSwitchHasLabelbooleannullDefine if Input switch have label
inputSwitchLabelPositionstringnullDefine Input switch label position. Value can be 'left-side-to-side', 'right-side-to-side', 'top-before-input-switch', 'bottom-after-input-switch'
inputBorderRadiusValuestringnullDefine Input border radius value
inputIconContainerBgstringnullDefine Input Icon parent container background value
isRequiredbooleanfalseDefine if Input value is required
dndInputLabelstringnullDrag and Drop input file label value
inputStyleDeclinationstringdefaultInput style declinaison. Value can be 'defaut', 'primary', 'success', 'warning', 'danger', 'volkan'
otherPropsanynullCan add all others input properties

License

MIT © VolkenoMakers