https://github.com/dashpilot/lazy-list
https://github.com/dashpilot/lazy-list
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/dashpilot/lazy-list
- Owner: dashpilot
- Created: 2024-12-06T15:22:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-06T15:55:21.000Z (over 1 year ago)
- Last Synced: 2025-02-09T08:45:13.186Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://lazy-list.vercel.app
- Size: 273 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LazyList
LazyList is a vanilla js list editor that allows you to:
- define input fields for the list items
- add new list items
- delete list items (with optional confim)
- serialize the list
- post to an enpoint to save the serialized list (optional)
LazyList works with your existing html, so you have a lot of freedom in the design and fields. The example uses simple Bootstrap styling.
## How to:
First define the layout for your list
```html
-
+
Save
```
Then include the js and initialize LazyList:
```html
// first parameter is the id of the wrapper
// second parameter is an optional url to POST the serialized list to
// set the third parameter to true, if you want a confirmation before deleting
const myLazyList = new LazyList('#my-component', false, true);
```
## How to build
To build a minified version of the script, run:
```bash
npm run build
```
This will output a minified version in the `public` folder
## Live demo
https://lazy-list.vercel.app/