Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-form-material-ui

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-form-material-ui

An adapter between Redux Form and Material UI components

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.2K
increased by44.72%
Maintainers
1
Weekly downloads
 
Created
Source

redux-form-material-ui


NPM Version NPM Downloads Build Status codecov.io

redux-form-material-ui is an adapter between Redux Form and Material UI components.


Installation

Using npm:

  $ npm install --save redux-form-material-ui

Usage

Pass this library as the adapter config property to redux-form, and then refer to the Material UI widgets as strings to the component property of redux-form's Field component.

import { reduxForm, Field } from 'redux-form'
import MenuItem from 'material-ui/MenuItem'
import { RadioButton } from 'material-ui/RadioButton'
import adapter from 'redux-form-material-ui'

class MyForm extends Component {
  render() {
    return (
      <form>
        <Field name="username" component="TextField" hintText="Street"/>
        
        <Field name="plan" component="SelectField" hintText="Select a plan">
          <MenuItem value="monthly" primaryText="Monthly"/>
          <MenuItem value="yearly" primaryText="Yearly"/>
          <MenuItem value="lifetime" primaryText="Lifetime"/>
        </Field>
        
        <Field name="agreeToTerms" component="Checkbox" label="Agree to terms?"/>
        
        <Field name="receiveEmails" component="Toggle" label="Please spam me!"/>
        
        <Field name="bestFramework" component="RadioButtonGroup">
          <RadioButton value="react" label="React"/>
          <RadioButton value="angular" label="Angular"/>
          <RadioButton value="ember" label="Ember"/>
        </Field>
      </form>
    )
  }
}

// Decorate with redux-form
MyForm = reduxForm({
  form: 'myForm',
  adapter
})

export default MyForm

Keywords

FAQs

Package last updated on 23 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc