# @mpndev/form-builder

> Yet another form build library.

Latest version **1.0.6** (published 2024-01-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install @mpndev/form-builder
pnpm add @mpndev/form-builder
yarn add @mpndev/form-builder
bun add @mpndev/form-builder
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2024-01-06 |
| First published | 2023-06-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 54.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mpndev |
| Maintainers | mpndev |
| Keywords | form-builder |

## Links

- npm: https://www.npmjs.com/package/@mpndev/form-builder
- Repository: https://github.com/mpndev/form-builder
- Homepage: https://github.com/mpndev/form-builder#readme
- Issues: https://github.com/mpndev/form-builder/issues
- npm.io page: https://npm.io/package/@mpndev/form-builder

## Dependencies (1)

- [typescript](https://npm.io/package/typescript.md) ^5.0.4

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2024-01-06
- 1.0.5 — 2024-01-05
- 1.0.4 — 2024-01-05
- 1.0.2 — 2024-01-05
- 1.0.1 — 2023-06-01
- 1.0.0 — 2023-06-01

## README

Form Builder
==============

***Installation:***
```shell
npm install @mpndev/form-builder
```

***Example: build form with 3 text inputs. one of them is normal text input, the other two will be text input and password input, wrapped together in a wrapper div element. Lets put and one submit button in the end.***
```ts
const formBuilder = require('form-builder')
const express = require("express")
const app = express()

app.listen(3000, () => {
    console.log("Application started and Listening on port 3000");
});

app.get("/", (req, res) => {
    const label = formBuilder.createLabel({
        title: 'first input',
        defaultValue: 'first input',
    })
    const label2 = formBuilder.createLabel({
        defaultValue: 'second input',
        title: 'second input'
    })
    const inputTypeText = formBuilder.createTextInput({label: label})
    const inputTypePassword = formBuilder.createPasswordInput({label: label2})
    const inputTypeText2 = formBuilder.createTextInput()
    const wrapper = formBuilder.createWrapper({elements: [inputTypeText, inputTypePassword]})
    const submitButton = formBuilder.createSubmit()
    const form = formBuilder.createForm({
        elements: [
            wrapper,
            inputTypeText2
        ],
        submit: submitButton
    })
    res.send(`<html><head></head><body>${form.build()}</body></html>`)
});
```

---
_Source: https://npm.io/package/@mpndev/form-builder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
