Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div id="bpmn-container"></div>


                #bpmn-container {
  /* use absolute values for height to ensure that the vertical diagram is not fully displayed when the page is opened. */
  /* width is relative to the window size */
  height: 50vh;
  border-style: solid;
  border-color: #b0b0b0;
  border-width: 1px;
  /* This ensures that the parts of the diagram outside of the container are not displayed. */
  overflow: hidden;
  background-color: white;
footer {
  float: right;
  margin-top: 0.75rem;
  font-style: italic;

.bpmn-activity-info > rect {
  fill: blue !important;
  fill-opacity: 30% !important;
  stroke: blue;
.bpmn-activity-success > rect {
  fill: green !important;
  fill-opacity: 15% !important;
  stroke: green;



                // 'bpmn-visualization' API documentation:

// Note about the 'bpmnvisu' global: only needed here because we use the IIFE bundle
// In a project, directly use 'BpmnVisualization'
const bpmnVisualization = new bpmnvisu.BpmnVisualization({
  container: "bpmn-container",
  navigation: { enabled: true } // remove this line or set to false if you don't want to use Diagram Navigation

// display the bpmn-visualization version in the footer
const footer = document.querySelector("footer");
const version = bpmnVisualization.getVersion();
footer.innerText = `bpmn-visualization@${version.lib}`;

// Load BPMN diagram
// Try the "Center" type to fit the whole container and center the diagram
bpmnVisualization.load(bpmnDiagram(), { fit: { type: "None" } });

// Add Overlay
bpmnVisualization.bpmnElementsRegistry.addOverlays("Event_05akz22", {
  position: "top-right",
  label: "OK!", // this is the only mandatory property
  style: {
    font: {
      color: "red",
      size: 20
    fill: {
      color: "white"
    stroke: {
      color: "red"

// Add style to BPMN Element
bpmnVisualization.bpmnElementsRegistry.addCssClasses("Activity_1potg3p", [
  "bpmn-activity-info" // CSS class declared in the CSS resources
  // "bpmn-activity-success" can be used instead for instance

// BPMN diagram content
function bpmnDiagram() {
  return `<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="" xmlns:bpmn="" xmlns:bpmndi="" xmlns:dc="" xmlns:di="" id="Definitions_01afj0d" targetNamespace="">
  <bpmn:process id="Process_0yqq1lz" isExecutable="false">
    <bpmn:startEvent id="StartEvent_08hc3xj" name="Start coding">
    <bpmn:task id="Activity_1potg3p" name="Enjoy &#39;BPMN Visualization&#39;">
    <bpmn:sequenceFlow id="Flow_1wkfbb0" sourceRef="StartEvent_08hc3xj" targetRef="Activity_1potg3p" />
    <bpmn:endEvent id="Event_05akz22" name="See you later!">
    <bpmn:sequenceFlow id="Flow_133a5kz" sourceRef="Activity_1potg3p" targetRef="Event_05akz22" />
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0yqq1lz">
      <bpmndi:BPMNEdge id="Flow_1wkfbb0_di" bpmnElement="Flow_1wkfbb0">
        <di:waypoint x="192" y="99" />
        <di:waypoint x="250" y="99" />
      <bpmndi:BPMNEdge id="Flow_133a5kz_di" bpmnElement="Flow_133a5kz">
        <di:waypoint x="350" y="99" />
        <di:waypoint x="412" y="99" />
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_08hc3xj">
        <dc:Bounds x="156" y="81" width="36" height="36" />
          <dc:Bounds x="145" y="124" width="59" height="14" />
      <bpmndi:BPMNShape id="Activity_1potg3p_di" bpmnElement="Activity_1potg3p">
        <dc:Bounds x="250" y="59" width="100" height="80" />
      <bpmndi:BPMNShape id="Event_05akz22_di" bpmnElement="Event_05akz22">
        <dc:Bounds x="412" y="81" width="36" height="36" />
          <dc:Bounds x="396" y="124" width="68" height="14" />