# risibank-web-api

> Integrate RisiBank in any front-end application 😎

Latest version **1.5.0** (published 2026-10-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install risibank-web-api
pnpm add risibank-web-api
yarn add risibank-web-api
bun add risibank-web-api
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2026-10-18 |
| First published | 2022-06-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 50.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | 7PH |
| Maintainers | risibank |

## Links

- npm: https://www.npmjs.com/package/risibank-web-api
- Repository: https://github.com/RisiBank/risibank-web-api
- Homepage: https://github.com/RisiBank/risibank-web-api#readme
- Issues: https://github.com/RisiBank/risibank-web-api/issues
- npm.io page: https://npm.io/package/risibank-web-api

## Recent versions

- 1.5.0 (latest) — 2026-10-18
- 1.4.1 — 2026-10-07
- 1.4.0 — 2026-09-12
- 1.3.2 — 2025-12-19
- 1.3.1 — 2025-12-08
- 1.3.0 — 2025-12-08
- 1.2.1 — 2025-12-07
- 1.2.0 — 2025-07-06
- 1.1.1 — 2024-07-07
- 1.1.0 — 2024-04-27
- 1.0.9 — 2024-04-27
- 1.0.8 — 2024-04-27
- 1.0.7 — 2024-04-27
- 1.0.6 — 2024-04-27
- 1.0.5 — 2024-04-27
- … 7 more at https://npm.io/package/risibank-web-api/versions

## README

# RisiBank Web API

Integrate RisiBank in any front-end application 😎

## Intro

The RisiBank Web API is a tiny JS library, it has no dependency and weights around 3kb minified and gzipped.

It allows you to integrate RisiBank in your website in the way that you prefer (overlay, modal, embedded in the page somewhere) with custom styling, and let user select medias from RisiBank.

The RisiBank Web API is the base building block for any application that needs to use RisiBank anywhere on the web.

## Getting started

1. Install RisiBank using a package manager

    ```bash
    npm i --save risibank-web-api
    # or
    yarn add risibank-web-api
    ```

    or by saving the web bundle in [dist/risibank.min.js](./dist/risibank.min.js) and importing it using a script tag

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

2. Import RisiBank

    ```javascript
    import { RisiBank } from 'risibank-web-api';
    ```

    if you are importing RisiBank Web API using a `script` tag, the `RisiBank` global variable is automatically available.

3. Open RisiBank

    ```javascript
    RisiBank.activate({
        /**
         * Use default options for Overlay + Dark
         * Other defaults are all combinations of Overlay/Modal/Frame and Light/Dark/LightClassic/DarkClassic, e.g. RisiBank.Defaults.Frame.LightClassic
         * @see https://github.com/RisiBank/risibank-web-api/blob/master/src/Defaults.js#L7
         */
        ...RisiBank.Defaults.Overlay.Dark,

        /**
         * What to do when a media is selected
         */
        onSelectMedia: ({ id, media }) => console.log('selected', id, media),
    });
    ```

## Useful links

-   A jsfiddle with a [simple demo in overlay mode](https://jsfiddle.net/7wqLj9x1/2/).
-   Another jsfiddle with a [complex demo in iframe mode](https://jsfiddle.net/khr9pvae/1/).
-   For API Reference, check [RisiBank.activate options](https://github.com/RisiBank/risibank-web-api/blob/master/src/RisiBank.js#L7).

## Used by

-   [RisiBank userscript collection](https://github.com/RisiBank/risibank-userscripts)
-   [RisiBank chrome extension](https://github.com/RisiBank/risibank-chrome-extension)
-   [RisiBank flutter application](https://github.com/RisiBank/risibank-flutter)

---
_Source: https://npm.io/package/risibank-web-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
