# bootstrap-multi-steps-component

> Multi Steps Form Component for Bootstrap

Latest version **1.2.0** (published 2022-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install bootstrap-multi-steps-component
pnpm add bootstrap-multi-steps-component
yarn add bootstrap-multi-steps-component
bun add bootstrap-multi-steps-component
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2022-09-10 |
| First published | 2022-09-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Manuel Ernesto Garcia |
| Maintainers | manuelernestog |
| Keywords | bootstrap, component, multi-steps, form |

## Links

- npm: https://www.npmjs.com/package/bootstrap-multi-steps-component
- Repository: https://github.com/manuelernestog/bootstrap-multi-steps-component
- Homepage: https://github.com/manuelernestog/bootstrap-multi-steps-component#readme
- Issues: https://github.com/manuelernestog/bootstrap-multi-steps-component/issues
- npm.io page: https://npm.io/package/bootstrap-multi-steps-component

## 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.2.0 (latest) — 2022-09-10
- 1.1.0 — 2022-09-10
- 1.0.2 — 2022-09-06
- 1.0.1 — 2022-09-06

## README

# Multi Steps Form Component for Bootstrap

Easily create a multi-step form for bootstrap.

- Bootstrap like sintaxis component
- No Js configuration required
- Installation with CDN

## Demo

https://manuelernestog.github.io/bootstrap-multi-steps-component/

## Requirements

Before include multi-steps-form you should install [Bootstrap](https://getbootstrap.com/) in your project.

## Installation

Simply include CDN file in your project. Put the CSS file inside `<head>` tag and the Js file in the bottom of your `<body>` tag.

```
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-multi-steps-component@1.2.0/dist/bootstrap-multi-steps-component.min.css" type="text/css" media="all" />
...
<script src='https://cdn.jsdelivr.net/npm/bootstrap-multi-steps-component@1.2.0/dist/bootstrap-multi-steps-component.min.js'></script>
```

## Usage

``` html
<div class="multi-steps-form faded">
    <div class="step fade active show" id="step1">
        ...
        <button class="step-link" data-bs-target="#step2">Next</button>
    </div>
    <div class="step fade" id="step2">
        ...
        <button class="step-link" data-bs-target="#step1">Back</button>
    </div>
</div>
```

Create a main `<div>` tag with class `multi-steps-form`. The class `faded` is optional, this one enable the fade effect when you move through the steps.

Inside the `multi-steps-form` tag create a `<div>` tag with class `step` for step, add a ID for each steep. 

For change between steps creat a tag with class `step-link` and add the attribute `data-bs-target="[step_id]"`.

You can also move between steps using Javascript.

``` javascript
const multiStepForm = new MultiStepForm("#form-container");

document.getElementById("buttonId").addEventListener("click", () => {
    ...
    multiStepForm.show("#step3");
});
```

## Contribution

Suggestions and pull requests are welcomed!

---
_Source: https://npm.io/package/bootstrap-multi-steps-component · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
