Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nextml-code/react-form-components


https://github.com/nextml-code/react-form-components

Last synced: 1 day ago
JSON representation

Awesome Lists containing this project

README

        

# React Form Components

Some form components for React

## Installation

```
npm install @aiwizo/react-form-components
```

## Basic Usage

### Select

```JavaScript
import { Select } from '@aiwizo/react-form-components';

{
return props.name;
}}

// callback triggered when an option
// is selected
onSelect={(option) => { /* Do something */ }}

// Set index of default value in the
// list of options (defaults to 0)
defaultIndex={2}
/>
```

```JavaScript
import { Button } from '@aiwizo/react-form-components';

```

```JavaScript
import { Checkbox } from '@aiwizo/react-form-components';

{ /* Do something */ }}

// Value that is passed to the onChange
// callback
value="some value"

// Optional label displayed to the
// right of the checkbox
label="Lorem Ipsum"
/>
```

```JavaScript
import { Input } from '@aiwizo/react-form-components';

```

```JavaScript
import { Label } from '@aiwizo/react-form-components';

Lorem ipsum
```