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.

Install

Next.js Demo Repository

View the complete Next.js integration example on GitHub

Usage

Quick usage:

For embedding a Metric Card you can use the dbn-metric webcomponent:
  • To find dashboardId please see here.
  • To find metricId please see here.

Token

The token should be a guest token, fetched from your backend based on the current user’s login information. You can see more about it here. 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:

Integrating metric

To see the full list of options please check the options list.