Giter VIP home page Giter VIP logo

form's Introduction

Form

Minimal Form & Input React Components.

Provides Form, Input, Textarea, Radio, Checkbox and Select component

npm bundle size npm bundle size npm download

Install

npm i @j4jinxx/form

Import

import Form, { Input, Select, Checkbox, Radio } from '@j4jinxx/form';

Form Props

Name Type Default Description
onDone func ( ) => { } Callback fired when Form gets validated and submitted (returns form current Ref)
children node Form children (input, radio, select, checkbox)

Input Props

Name Type Default Description
name string Input field name
type string text Input field type
label string Input field label
showLabel bool true If false, field label is hidden
withGroup bool true If false, field margin is removed

Select Props

Name Type Default Description
name string Select field name
options array [ ] Select field options ( [{ label, value }, { label, value }] )
label string Select field label
showLabel bool true If false, field label is hidden
withGroup bool true If false, field margin is removed

Checkbox Props

Name Type Default Description
name string Checkbox field name
options array [ ] Checkbox field options ( [{ label, value }, { label, value }] )
label string Checkbox field label
showLabel bool true If false, field label is hidden
withGroup bool true If false, field margin is removed
selectedValues array [ ] Default Checked Options
inline bool true If true, Checkbox options shown inline

Radio Props

Name Type Default Description
name string Radio field name
options array [ ] Radio field options ( [{ label, value }, { label, value }] )
label string Radio field label
showLabel bool true If false, field label is hidden
withGroup bool true If false, field margin is removed
selectedValue any Default Checked Option
inline bool true If true, Radio options shown inline

form's People

Contributors

j4jinx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.