Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/joelvoss/form-lit

Lit form library written in React
https://github.com/joelvoss/form-lit

forms react

Last synced: 12 days ago
JSON representation

Lit form library written in React

Awesome Lists containing this project

README

        

# form-lit

Lit form library written in React

## Install

```text
npm install form-lit OR yarn add form-lit
```

## Example

```js
import React from 'react';
import ReactDOM from 'react-dom';
import { Form, Input } from 'form-lit';

const App = () => {
const handleSubmit = form => {
console.log(form);
// -> { my-input: "dynamic value" }
};

return (

Submit

);
};

ReactDOM.render(, document.getElementById('root'));
```

Have a look inside the `example/` directory to see the development kitchensink
application using a multitude of available form fields.

## Local development

1. Clone this repository and install it's dependencies

```bash
# Using npm
npm install

# Using yarn
yarn install
```

2. Validate project setup

```bash
# Using npm
npm run validate

# Using yarn
yarn validate
```

3. Navigate into the `example/` folder to start your local development
environment.

```bash
cd ./example

# Using npm
npm install && npm start

# Using yarn
yarn install && yarn start
```

This will start a simple React application powered by Parcel on `http://localhost:1234`.

---

This project was bootstrapped with [jvdx](https://github.com/joelvoss/jvdx).