BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Supabase Library/realtime-flow-react

Realtime Flow

supabase-library/realtime-flow-react
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.json

Source

registry/default/blocks/realtime-flow/components/realtime-flow.tsxraw.githubusercontent.com/supabase/supabase/master/apps/ui-library/public/r/realtime-flow-react.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/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/lib/supabase/client.ts

Facts

Registry
Supabase Library
Type
registry:component
Access
Free
Files written
3
Licence
Apache-2.0
First indexed
2026-08-11
Last confirmed
today

Go to the source

supabase.com supabase/supabase on GitHub Raw registry item This item as JSON

More from Supabase Library

All 60 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Current User Avatarcurrent-user-avatar-nextjsSupabase LibraryComponentsFree2 deps · 6 files
Current User Avatarcurrent-user-avatar-reactSupabase LibraryComponentsFree1 dep · 4 files
Current User Avatarcurrent-user-avatar-react-routerSupabase LibraryComponentsFree2 deps · 5 files
Current User Avatarcurrent-user-avatar-tanstackSupabase LibraryComponentsFree2 deps · 5 files
Dropzone (File Upload)dropzone-nextjsSupabase LibraryComponentsFree4 deps · 5 files
Dropzone (File Upload)dropzone-reactSupabase LibraryComponentsFree3 deps · 3 files
Dropzone (File Upload)dropzone-react-routerSupabase LibraryComponentsFree4 deps · 4 files
Dropzone (File Upload)dropzone-tanstackSupabase LibraryComponentsFree4 deps · 4 files
BlockDex

Built by

Kynth Studios

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 Studios

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 Studios

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