1.3.1 • Published 2 years ago

formfieldsui v1.3.1

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

Input field's for React.js and Next.js ---

Installation:-

Using npm :-
$ npm install --save formfieldsui
Using yarn :-
$ yarn add formfieldsui

Import and example:-

import { EmailFieldInput, TextFieldInput, TextAreaFieldInput, PasswordFieldInput, ButtonFieldInput} from "formfieldsui";

<EmailFieldInput
label='EmailLabel'
placeholder='placeholder'
onChange={(e) =>  e.target.value}
/>

<TextFieldInput
label='textLabel'
placeholder='placeholder'
onChange={(e) =>  e.target.value}
/>

<TextAreaFieldInput
label='textAreaLabel'
placeholder='placeholder'
onChange={(e) =>  e.target.value}
/>

<PasswordFieldInput
label='textLabel'
placeholder='placeholder'
onChange={(e) =>  e.target.value}
/>

<ButtonFieldInput
onClick={() => alert('alert message')}
buttonText="Click"
/>

Props:-

NameTypeDefaultDescription
typestringtext-TextFieldInput, email-EmailFieldInput, password-PasswordFieldInputIt's customizable and it's only applicable for TextFieldInput
LabelstringThe label content.
helperTextstringThe helper text content for message's.
errorboolfalseIf true, the label is displayed in an error state.
idstringThe id of the input element. Use this prop to make label and helperText accessible for screen readers.
valueanyThe value of the input element, required for a controlled component.
namestringName attribute of the input element.
placeholderstringThe placeholder content.
onChangefunconChange={(e)= e.target.value}
rowsnumberThe rows attribute specifies the visible height of a text area, in lines. (it's only aplicable for TextAreaFieldInput)
colsnumberThe cols attribute specifies the visible width of a text area. (it's only aplicable for TextAreaFieldInput)
disabledboolfalseIf true, the input field is disabled
showPasswordboolIt's only applicable for PasswordFieldInput, this state change show and hide icon & paswword filed type to text>password and vice versa
showImgstringIt is used to pass show password eye icon image path
hideImgstringIt is used to pass hide password eye icon image path
changeIconFuncfunchandle showPassword state
autoFocusstringSpecifies that a button should automatically get focus when the page loads
buttonTextstringbutton name

ClassName for Css:-

lableClass = for label,
rootClass = for input fields,
helperTextClass = for notification "error message"

variant :-

Variant name for Input fields
Outlined
Standard
Filled
Ex:-
import { Standard, Filled, Outlined  } from "formfieldsui";

    <TextFieldInput  variant={Outlined} />
    <EmailFieldInput  variant={Standard} />
    <PasswordFieldInput  variant={Filled} />
Variant name for Button
BtnOutlined
BtnStandard
BtnFilled
Ex:-
import { BtnOutlined } from "formfieldsui";

    <ButtonFieldInput variant={BtnOutlined}/>
1.2.0

2 years ago

1.1.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago