Skip to main content

@databrainhq/plugin

Databrain app UI web component plugin.

npm: @databrainhq/plugin

v0.15.135-uat

Code Style: StandardJS

Enforced using StandardJS styleguide.
To see the full list of options please check the options list.

Install

React Demo Repository

View the complete React integration example on GitHub

Usage

Quick usage:
App.tsx
For embedding a Metric Card you can use the dbn-metric webcomponent:

Token

The token should be a guest token, fetched from your backend based on the current user’s login information. You can follow the document below for guest token generation. Here is an example with sample token and dashboardId that you can use in your frontend app to get started without a backend.

Breakdown:

Import the library main or index or App or layout file
Once the library is imported, the web-components dbn-dashboard, dbn-metrics are available to use anywhere inside your app. And you can use it anywhere in your app like:

Intgerating Metric