---
url: /demos/yjs.md
description: This is an example application using Electric with Yjs.
---

# {{ $frontmatter.title }}

{{ $frontmatter.description }}

## Electric Yjs provider

An example text editor showing how to use Yjs and Electric together. It uses the Y-Electric [provider](https://docs.yjs.dev/tutorials/creating-a-custom-provider) to sync Yjs document and awareness changes to all connected clients. Checkout the [package](https://github.com/electric-sql/electric/tree/main/packages/y-electric) to learn how to integrate Yjs with your existing app:

<<< @../../packages/y-electric/src/y-electric.ts{typescript}
