React PowerBI Component
This is to get you quickly embed your powerbi reports to your React Application.
Right now (before v1), it's very much a work in progress. Please submit your issues.
How to Use
import React Component from 'react'import PowerbiEmbedded from 'react-powerbi' { return <div ='App'> <PowerbiEmbedded = // = // = // = = = = = = = ='600px' ='900px' /> </div> }
Mobile Optimization
You only need to add mobile prop as boolean.
That set a configuration { layoutType: models.LayoutType.MobilePortrait }
.
Check this reference
Embed Type
The embed type variable allows you to pass in the requested PowerBI "Type", be that a report
, dashboard
or tile
. See reference. By default, report
is selected.
TODO
- Add .d.ts file for typescript (Thanks @Joonaspraks!)