Installation

npm / yarn / pnpm

npm install brij
yarn add brij
pnpm add brij

Import as an ES module in your application:

import { Brij } from 'brij'

Or use the factory if you need multiple isolated instances:

import { createBrij } from 'brij'

const brij = createBrij({ host: 'https://app.yourco.com', apiKey: 'pk_...' })

CDN / UMD

Add a script tag before your closing </body>:

<script src="https://unpkg.com/brij/dist/brij.umd.cjs"></script>
<script>
  Brij.init({ host: 'https://app.yourco.com', apiKey: 'pk_...' })
</script>

The UMD build exposes a global Brij object with the same API.

TypeScript

brij.js ships with full TypeScript definitions. No @types package needed.

import { Brij, type BrijOpenOptions } from 'brij'

const opts: BrijOpenOptions = { mode: 'panel' }
await Brij.open('contact', opts)