> For the complete documentation index, see [llms.txt](https://hichemtech.gitbook.io/reqease-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hichemtech.gitbook.io/reqease-docs/installation.md).

# Installation

## Installation Instructions

### **Using package manager (Module Environment)** [*<mark style="color:blue;">**(Recommended)**</mark>*](#user-content-fn-1)[^1]

If you're working in a module environment, you can use npm to install ReqEase as a package. This method is ideal if you want to manage ReqEase as a dependency in your project.

#### **Install ReqEase**

{% tabs %}
{% tab title="npm" %}

```bash
npm install @reqease/reqease
```

{% endtab %}

{% tab title="yarn" %}

#### <mark style="color:yellow;">Coming soon</mark>

{% endtab %}
{% endtabs %}

This will download and install ReqEase and its dependencies into your project.

#### **Create a Custom ReqEase calling (optional)**

While not mandatory, creating a custom ReqEase calling allows you to set default configurations for ReqEase throughout your entire website. For instance, you can specify global options like the validation source, default constraints, and more.

```javascript
import ReqEase from '@reqease/reqease';

const defaultOptions = {
  ...
};

class MyCustomReqEase {
  reqEaseInstance;
  constructor(exceptionalOptions) {
    let options = $.extend(true, defaultOptions, exceptionalOptions);
    this.reqEaseInstance = new ReqEase(options);
  }
  
  getReqEaseInstance() {
    return this.reqEaseInstance;
  }
}

// Now, you can use MyCustomReqEase throughout your website instead of ReqEase.
```

Usage:

```javascript
const myCustomReqEase = new MyCustomReqEase();
```

By creating a custom class, you avoid repeating the same configuration for ReqEase in every script. This approach simplifies management and maintenance, especially in larger projects.

### **Using static script tags**

If you prefer not to use npm and want a quick way to include ReqEase in your project, you can use a static script tag. ReqEase can be loaded via CDN or by downloading the script and including it in your project.

* **CDN**

To include ReqEase via CDN, add the following script tag to your HTML file's `<head>` section:

```html
<script src="https://cdn.jsdelivr.net/gh/ReqEase/ReqEase@latest/dist/reqease.min.js"></script>
```

* **Local Download**

If you prefer a local copy of ReqEase, download the script from the ReqEase repository and include it in your project:

1. Visit the [ReqEase GitHub repository](https://github.com/ReqEase/ReqEase).
2. Download the `reqease.js` ( or `reqease.min.js )`file.
3. Place the downloaded file in your project directory.
4. Include the script in your HTML file:

```html
<script src="path/to/reqease.js"></script>
```

{% hint style="warning" %}
Additionally, I'll mention that certain configurations, like registering custom classes, are available exclusively in the module environment. To learn more about these advanced options, refer to the [advanced configurations section](/reqease-docs/form-validation/captcha-validation.md#customizing-captcha-validation) in this documentation.

This flexible installation approach allows you to choose the best setup based on your project's needs, whether you're looking for extensive customization or a straightforward integration.
{% endhint %}

[^1]: you can take full advantage of ReqEase's features and customization options that may not be accessible with the library imported by static scripts bundling.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hichemtech.gitbook.io/reqease-docs/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
