Function: DbmlViewer()
function DbmlViewer(props): ReactElement;
Interactive diagram viewer (browser only; React Flow inside): compiles the source and shows it
on a read-only DiagramCanvas with a toolbar (search and path, detail level, zoom, export to
SVG / PNG / PDF, deep links), title, error banner and empty states. Nothing here touches
window at import time, so the module can be imported during SSR; render it on the client only.
Parameters
props
See DbmlViewerProps.
Returns
ReactElement
Example
import { DbmlViewer } from '@relvista/renderer';
import '@relvista/renderer/styles.css';
export function Schema({ dbml }: { dbml: string }) {
return <DbmlViewer source={dbml} title="Shop" height={520} detailLevel="keys" />;
}