šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

bpmn-js-react

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bpmn-js-react

[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) ![All Contributors](https://img.shields.io/github/forks/majeeddl/bpmn-js-react.svg) ![Issue Open](https://img.shields.io/github/issues/ma

1.0.22
latest
Source
npm
Version published
Weekly downloads
3
-50%
Maintainers
0
Weekly downloads
Ā 
Created
Source

bpmn-js-react

JavaScript Style Guide All Contributors Issue Open Issue Close

This project is developed for using Use bpmn-js to display BPMN 2.0 diagrams in a React application.

Install

yarn add bpmn-js-react 

or

npm install --save bpmn-js-react

Usage

import { BpmnJsReact,useBpmnJsReact } from "bpmn-js-react";

const ComponentForBpmnViewer = (props) => {
  return <BpmnJsReact xml={xml} />;
};

const ComponentForBpmnModeler = (props) => {

  const bpmnReactJs = useBpmnJsReact();
 
  const saveXml = async () => {
    const result = await bpmnReactJs.saveXml()

    console.log(result?.xml)
  }

  return (
     <div>
         <BpmnJsReact  useBpmnJsReact={bpmnReactJs} mode="edit" xml={xml} />
         <button onClick={()=> saveXml()}>Save Xml</>
     </div>
  );
};

Props

NameTypeDescription
mode'view' | 'edit'
xmlstringxml string of bpmn
heightnumberDefault value is 300
clickfunctionThis function is called when you do click on bpmn elemnt
dbclickfunctionThis function is called when you do dbclick on bpmn elemnt

Resources

  • Issues

License

MIT Ā© Majeed Dourandeesh

All Contributors

Keywords

bpmn-js

FAQs

Package last updated on 21 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts