Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/joelvoss/form-lit
- Owner: joelvoss
- License: mit
- Created: 2019-12-05T21:42:36.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-09T17:42:51.000Z (almost 5 years ago)
- Last Synced: 2024-12-11T22:27:20.295Z (about 1 month ago)
- Topics: forms, react
- Language: TypeScript
- Homepage:
- Size: 76.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).