Socket
Book a DemoInstallSign in
Socket

@bobril/mermaid

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bobril/mermaid

Mermaid component for Bobril

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Bobril Mermaid Component

npm version

Demo

How to use

It must be wrapped by Suspense and ErrorBoundary (just good to have) components.

import * as b from "bobril";
import * as mermaid from "@bobril/mermaid";

b.init(() => (
    <b.ErrorBoundary fallback={(e) => <div>Error occurred {e.message}</div>}>
        <b.Suspense fallback={<div>Rendering...</div>}>
            <mermaid.Mermaid>{`graph TD; A-->B;`}</mermaid.Mermaid>
        </b.Suspense>
    </b.ErrorBoundary>
));

Global settings

import * as mermaid from "@bobril/mermaid";

mermaid.setTheme("dark");
mermaid.setSecurityLevel("loose");
mermaid.setLogLevel(5);
mermaid.setDarkMode(true);

Props of component

  • children?: string - only one string child is allowed and it must contain mermaid code to render
  • style?: b.IBobrilStyle - optional style for the component

Acknowledges

  • mermaid - actual ground work

Keywords

bobril

FAQs

Package last updated on 05 Sep 2025

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