Coder Social home page Coder Social logo

react-semantic-redux-form's Introduction

react-semantic-redux-form

Semantic-ui-react component integration with Redux form

Integration of Semantic UI React with Redux Form

Available Components

Components with Field suffix are Form.Field(A field is a form element containing a label and an input.) components

  1. InputField - An InputField is a form field.

  2. TextAreaField

  3. SelectField

  4. ToggleField

  5. CheckboxField

  6. LabelInputField - A Form Field input component formatted with a label. Labled Input

  7. Toggle

  8. Checkbox

  9. Input

  10. TextArea

  11. Select

  12. Dropdown

  13. DropdownField

  14. RangeField

  15. Range

  16. UploadField

  17. Upload

Radio & RadioField will be removed.

Example input text

import { Field } from 'redux-form';

import { InputField } from 'react-semantic-redux-form';

<Field name='name' component={InputField} label='Name' placeholder='Name' />

Example input textarea

import { Field } from 'redux-form';

import { TextAreaField } from 'react-semantic-redux-form';

<Field name='name' component={TextAreaField} label='Name' placeholder='Name' />

Example Login Form

import React from 'react';

import PropTypes from 'prop-types';

import { Field, reduxForm } from 'redux-form';

import { Form, Icon, Button } from 'semantic-ui-react';

import { LabelInputField, CheckboxField } from 'react-semantic-redux-form';

const LoginForm = props => {

return (

<Form onSubmit={handleSubmit}>
  <Field name='username' component={LabelInputField}
  label={{ content: <Icon color='blue' name='user' size='large'/> }}
  labelPosition='left'
  placeholder='Username'/>

  <Field name='password' component={LabelInputField}
  type='password'
  label={{ content: <Icon color='blue' name='lock' size='large'/> }}
  labelPosition='left'
  placeholder='Password'/>

  <Form.Group>
  <Field name='remember' component={CheckboxField}
  label='Stay sign in'/>

  </Form.Group>
  <Form.Field control={Button} primary
  type='submit'>
  Login
  </Form.Field>

</Form>

) }

export default reduxForm({ form: 'loginForm', // a unique identifier for this form

})(LoginForm)

react-semantic-redux-form's People

Watchers

 avatar  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.