BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Supabase UI Library/realtime-flow-react-router

Realtime Flow

supabase-ui-library/realtime-flow-react-router
FreeComponent

Real-time flow diagram editor for collaborative applications.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/supabase/supabase/master/apps/ui-library/public/r/realtime-flow-react-router.json

Source

registry/default/blocks/realtime-flow/components/realtime-flow.tsxraw.githubusercontent.com/supabase/supabase/master/apps/ui-library/public/r/realtime-flow-react-router.json
1'use client'
2
3import {
4 ReactFlow,
5 ReactFlowProvider,
6 Background,
7 Controls,
8 type Node,
9 type Edge,
10 type NodeTypes,
11 type EdgeTypes,
12} from '@xyflow/react'
13import '@xyflow/react/dist/style.css'
14import type { SupabasePersistenceOptions } from '@supabase-labs/y-supabase'
15
16import { RealtimeFlowOverlay } from './realtime-flow-overlay'
17import { useRealtimeFlow } from '../hooks/use-realtime-flow'
18
19type RealtimeFlowProps = {
20 channel: string
21 className?: string
22 style?: React.CSSProperties
23 persistence?: boolean | SupabasePersistenceOptions
24 initialNodes?: Node[]
25 initialEdges?: Edge[]
26 nodeTypes?: NodeTypes
27 edgeTypes?: EdgeTypes
28 height?: string | number
29}
30
31const DEFAULT_HEIGHT = 550
32
33const RealtimeFlowContent = ({
34 channel,
35 className,
36 style,
37 persistence,
38 initialNodes,
39 initialEdges,
40 nodeTypes,
41 edgeTypes,
42 height = DEFAULT_HEIGHT,
43}: RealtimeFlowProps) => {
44 const { nodes, edges, synced, syncError, onNodesChange, onEdgesChange, onConnect } =
45 useRealtimeFlow({
46 channel,
47 persistence,
48 initialNodes,
49 initialEdges,
50 })
51
52 return (
53 <div style={{ height, position: 'relative', ...style }} className={className}>
54 <ReactFlow
55 nodes={synced ? nodes : []}
56 edges={synced ? edges : []}
57 onNodesChange={synced ? onNodesChange : undefined}
58 onEdgesChange={synced ? onEdgesChange : undefined}
59 onConnect={synced ? onConnect : undefined}
60 nodeTypes={nodeTypes}
61 edgeTypes={edgeTypes}
62 fitView
63 >
64 <Background />
65 <Controls />
66 </ReactFlow>
67 {!synced && !syncError && <RealtimeFlowOverlay status="syncing" />}
68 {!synced && syncError && <RealtimeFlowOverlay status="error" message={syncError} />}
69 </div>
70 )
71}
72
73const RealtimeFlow = (props: RealtimeFlowProps) => (
74 <ReactFlowProvider>
75 <RealtimeFlowContent {...props} />
76 </ReactFlowProvider>
77)
78
79export { RealtimeFlow }

What it pulls in

npm packages

  • @xyflow/react@latest
  • @supabase-labs/y-supabase@latest
  • y-protocols@latest
  • yjs@latest
  • @supabase/ssr@latest
  • @supabase/supabase-js@latest

Files it writes

  • registry/default/blocks/realtime-flow/hooks/use-realtime-flow.ts
  • registry/default/blocks/realtime-flow/components/realtime-flow.tsx
  • registry/default/clients/react-router/lib/supabase/client.ts
  • registry/default/clients/react-router/lib/supabase/server.ts

Facts

Registry
Supabase UI Library
Type
registry:component
Access
Free
Files written
4
Licence
Apache-2.0
First indexed
2026-08-01
Last confirmed
yesterday

Go to the source

supabase.com aimultiple-benchmark/supabase-bench-cr-2 on GitHub Raw registry item This item as JSON

More from Supabase UI Library

All 37 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Current User Avatarcurrent-user-avatar-nextjsSupabase UI LibraryComponentsUnverified2 deps · 6 files
Current User Avatarcurrent-user-avatar-reactSupabase UI LibraryComponentsUnverified1 dep · 4 files
Current User Avatarcurrent-user-avatar-react-routerSupabase UI LibraryComponentsUnverified2 deps · 5 files
Current User Avatarcurrent-user-avatar-tanstackSupabase UI LibraryComponentsUnverified2 deps · 5 files
Dropzone (File Upload)dropzone-nextjsSupabase UI LibraryComponentsUnverified4 deps · 5 files
Dropzone (File Upload)dropzone-reactSupabase UI LibraryComponentsUnverified3 deps · 3 files
Dropzone (File Upload)dropzone-react-routerSupabase UI LibraryComponentsUnverified4 deps · 4 files
Dropzone (File Upload)dropzone-tanstackSupabase UI LibraryComponentsUnverified4 deps · 4 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex