mirror of
https://github.com/supabase/supabase.git
synced 2026-05-08 07:50:20 +08:00
* Add realtime chat to the landing page. * Fix the realtime cursor demo on the landing page. * Fix a bad spelling of shadcn. * Fix the wrong link in RR auth. * Change the demo for reatlime cursor to use predefined names. * Fix the React Router auth block docs. * Regenerate the realtime chat code. * Add a docs field to the clients blocks. Add a missing package to the nextjs client block. * Add links to additional docs on the auth blocks pages. * Add additional links to the current user avatar docs. * Add additional links to the client docs. * Add additional links to the dropzone docs. * Add additional links to the avatar stack. * Add additional links to the realtime cursor. * Add additional links to the realtime chat. * Fix the dropzone links.
46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
---
|
|
title: Realtime Avatar Stack
|
|
description: Avatar stack in realtime
|
|
---
|
|
|
|
<BlockPreview name="realtime-avatar-stack-demo" />
|
|
|
|
## Installation
|
|
|
|
<BlockItem
|
|
name="realtime-avatar-stack-tanstack"
|
|
description="Renders a stack of avatars which are connected via Supabase Realtime"
|
|
/>
|
|
|
|
## Folder structure
|
|
|
|
<RegistryBlock itemName="realtime-avatar-stack-tanstack" />
|
|
|
|
## Usage
|
|
|
|
The `RealtimeAvatarStack` component renders stacked avatars which are connected to Supabase Realtime. It uses the Presence feature of Supabase Realtime. You can use this to show currently online users in a chatroom, game session or collaborative app.
|
|
|
|
```tsx
|
|
import { RealtimeAvatarStack } from '@/components/realtime-avatar-stack'
|
|
|
|
export default function Page() {
|
|
return (
|
|
<Header className="flex items-center justify-between">
|
|
<h1>Lumon Industries</h1>
|
|
<RealtimeAvatarStack roomName="break_room" />
|
|
</Header>
|
|
)
|
|
}
|
|
```
|
|
|
|
## Props
|
|
|
|
| Prop | Type | Default | Description |
|
|
| ---------- | -------- | ------- | ---------------------------------------------------- |
|
|
| `roomName` | `string` | `null` | The name of the Supabase Realtime room to connect to |
|
|
|
|
## Further reading
|
|
|
|
- [Realtime Presence](https://supabase.com/docs/guides/realtime/presence)
|
|
- [Realtime authorization](https://supabase.com/docs/guides/realtime/authorization)
|