react-candid
v0.1.1
Published
Embed the Candid UI in your React application
Downloads
4
Maintainers
Readme
react-candid
A React component for the Candid interface description language.
Install
npm install --save react-candid
Quick Start
import React from 'react'
import ReactDOM from 'react-dom'
import Candid from 'react-candid'
ReactDOM.render(
<Candid principal="mwrha-maaaa-aaaab-qabqq-cai" />,
document.getElementById('root'),
)
Advanced Usage
import React from 'react'
import { Candid } from 'react-candid'
const App = () => {
return (
<Candid
principal="mwrha-maaaa-aaaab-qabqq-cai" // Canister ID (principal)
candid="" // Optional candid interface (base 64)
local={false} // Use your local replica?
width="100%" // Component width
height="100vh" // Component height
/>
)
}
export default App