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

https://github.com/dashpilot/lazy-list


https://github.com/dashpilot/lazy-list

Last synced: about 1 year ago
JSON representation

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/