Dropforms. Forms that are contained inside buttons.
#Installation
npm install react-dropform --save
require DropFrom
in the component you wish to use this in.
var DropForm = require('./dropform.jsx');
include dropform.css
to your project.
<link rel="stylesheet" href="./link/to/dropform.css">
var DropForm = require('dropform');
var component = React.createClass({
render: function() {
return (
<div>
<DropForm
open={false}
title='Sign In'
formStyle='default' // * optional
className='inline-block align-top'>
{
// Add the form you want to create. Example below.
}
<form>
<fieldset>
<input type="text" className="centered capitalize" name='preview' required/>
<label for='preview'>Email Address</label>
</fieldset>
<fieldset>
<input type="password" className="centered capitalize" name='preview' required/>
<label for='preview'>Password</label>
</fieldset>
<button className='sharp-filled white-text' type='submit'>Submit</button>
</form>
</DropForm>
</div>
);
}
});
<DropForm
open={false}
title='Sign In'
className='inline-block align-top'>
open (boolean)
: Whether or not the form is shown on initial render.
title (string)
: Title of the button.
className (string)
: Additional classes for the form container.
formStyle (string)
: default
, semi-round
, round
(see demo video)