Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bpmn-io/svelte-bpmn

Embed BPMN 2.0 diagrams in your Svelte app
https://github.com/bpmn-io/svelte-bpmn

bpmn bpmn-js svelte

Last synced: 3 months ago
JSON representation

Embed BPMN 2.0 diagrams in your Svelte app

Awesome Lists containing this project

README

        

# svelte-bpmn

[![CI](https://github.com/bpmn-io/svelte-bpmn/workflows/CI/badge.svg)](https://github.com/bpmn-io/svelte-bpmn/actions?query=workflow%3ACI)

Embed BPMN 2.0 diagrams in your [Svelte](https://svelte.dev/) app - powered by [bpmn-js](https://github.com/bpmn-io/bpmn-js).

## Installation

```sh
npm install --save svelte-bpmn
```

## Usage

```svelte

import SvelteBpmn from 'svelte-bpmn';

const diagram = '..'; // import your BPMN 2.0 XML here

const handleDiagramLoaded = () => {
console.log('Diagram successfully loaded!');
};

const handleDiagramError = (error) => {
console.log('Diagram import resolved in errors: ', error);
};

const handleDiagramWarning = (warnings) => {
console.log('Diagram import warnings: ', warnings);
};

.diagram-container {
height: 700px;
border: 1px solid grey;
}




```

Checkout the [example](./example) to get further information.

## Additional Resources

* [bpmn-js Examples](https://github.com/bpmn-io/bpmn-js-examples)
* [bpmn-js Viewer Documentation](https://github.com/bpmn-io/bpmn-js/blob/master/lib/Viewer.js), [Example](https://github.com/bpmn-io/bpmn-js-examples/blob/master/starter/viewer.html)
* [bpmn-js Modeler Documentation](https://github.com/bpmn-io/bpmn-js/blob/master/lib/Modeler.js), [Example](https://github.com/bpmn-io/bpmn-js-examples/tree/master/modeler)

## License

MIT