@arnat/styled-form
v0.0.12
Published
The bootstrap form component created with styled-components
Downloads
15
Readme
ARNAT - styled-form
Modular approach to use bootstrap components for quick prototypes, as an entrypoint of the component library.
Usage
import { Button, ButtonGroups, ButtonToolbar } from '@arnat/styled-form';
const MyFormComponent = props => (
<form>
<FormGroup>
<label>
Email address <FormControl type="email" placeholder="Enter email" />
</label>
<FormText muted>We'll never share your email with anyone else.</FormText>
</FormGroup>
<FormGroup>
<label>
Password <FormControl type="password" placeholder="Password" />
</label>
</FormGroup>
<FormCheck>
<label>
<FormCheckInput type="checkbox" /> Check me out
</label>
</FormCheck>
<FormGroup>
<Button block primary>
Submit
</Button>
</FormGroup>
</form>
);
const MyInputGroupComponent = props => (
<InputGroup>
<InputGroupPrepend>
<InputGroupText>@</InputGroupText>
</InputGroupPrepend>
<FormControl type="text" placeholder="Username" />
</InputGroup>
);
Properties
Properties which can be added to the component to change the visual appearance.
inline
only on FormCheck, FormControlPlainText Type: booleandisabled
only on FormCheckInput, FormControl Type: booleanreadonly
only on FormControl Type: booleanvalid
only on FormControl Type: booleaninvalid
only on FormControl Type: booleanformInline
only on FormControl, FormGroup Type: booleansm
small, only on FormControl, FormControlPlainText, FormGroup, InputGroup Type: booleanlg
large, only on FormControl, FormControlPlainText, FormGroup, InputGroup Type: booleanmultiple
only on FormControl Type: booleanselect
only on FormControl Type: booleantextarea
only on FormControl Type: booleanpill
only on FormControl Type: booleannoRadius
only on FormControl, FormGroup Type: booleanrow
only on FormGroup Type: booleannomb
no margin-bottom, only on FormGroup Type: booleanjustify
only on FormGroup Type: booleanmuted
only on FormText Type: boolean