Install
pnpm add @r4pm/components react react-domReact and React DOM are peer dependencies. These are the same components Propel is built from.
Use
Import @r4pm/components/styles.css once. It bundles Tailwind and the Radix theme.
tsx
import "@r4pm/components/styles.css";
import { Theme, PetriNetViewer } from "@r4pm/components";
<Theme>
<PetriNetViewer data={net} />
</Theme>;If your app already runs Tailwind, import @r4pm/components/rules.css after your own Tailwind entry instead, and point Tailwind at the package source:
css
/* your index.css */
@import "tailwindcss";
@source "../node_modules/@r4pm/components/src";Entry points
Heavier viewers sit behind subpaths, so importing the main entry never pulls in Plotly or the Petri net editor.
| @r4pm/components | Viewers (DFG, Petri net, OCEL summaries, alignments), inputs, ViewerConfigProvider |
| @r4pm/components/ui | Radix Themes primitives (Theme, Button, Card, ...) |
| @r4pm/components/petri | The React Flow + ELK Petri net editor |
| @r4pm/components/charts | Plotly charts: DottedChart, CaseDurationChart, EventsPerTimeChart, ... |
Component gallery
The Storybook has every component with sample data and props tables generated from the TypeScript types.