Example apps
Find an example app with code most similar to what you want to build
Example apps with demo and code
Image upload
React
Image upload
tsx
import {createImage } from "jazz-browser-media-images";import {ProgressiveImg } from "jazz-react";import {ImageDefinition } from "jazz-tools";import {ChangeEvent ,useRef } from "react";import {useAccount } from "./main.tsx";functionImage ({image }: {image :ImageDefinition }) {return (<ProgressiveImg image ={image }>{({src }) => <img src ={src } />}</ProgressiveImg >);}export default functionImageUpload () {const {me } =useAccount ();constinputRef =useRef <HTMLInputElement >(null);constonImageChange = async (event :ChangeEvent <HTMLInputElement >) => {if (!me ?.profile ) return;constfile =event .currentTarget .files ?.[0];if (file ) {me .profile .image = awaitcreateImage (file , {owner :me .profile ._owner ,});}};constdeleteImage = () => {if (!me ?.profile ) return;me .profile .image = null;};return (<><div >{me ?.profile ?.image && <Image image ={me .profile .image } />}</div ><div >{me ?.profile ?.image ? (<button type ="button"onClick ={deleteImage }>Delete image</button >) : (<div ><label >Upload image</label ><input ref ={inputRef }type ="file"onChange ={onImageChange } /></div >)}</div ></>);}
Reactions
React
CoFeed
tsx
import {ID } from "jazz-tools";import {useCoState } from "./main.tsx";import {ReactionType ,ReactionTypes ,Reactions } from "./schema.ts";constreactionEmojiMap : {[reaction in (typeofReactionTypes )[number]]: string;} = {aww : "😍",love : "❤️",haha : "😂",wow : "😮",tiny : "🐥",chonkers : "🐘",};export functionReactionsScreen (props : {id :ID <Reactions > }) {constreactions =useCoState (Reactions ,props .id , []);if (!reactions ) return;return (<><section ><h1 >Add your reaction</h1 ><ReactionButtons reactions ={reactions } /></section ><section ><h2 >Reactions from you and other users</h2 ><ReactionOverview reactions ={reactions } /></section ></>);}constReactionButtons = ({reactions }: {reactions :Reactions }) => (<div className ="reaction-buttons">{ReactionTypes .map ((reactionType ) => (<button key ={reactionType }type ="button"onClick ={() => {reactions ?.push (reactionType );}}title ={`React with ${reactionType }`}className ={reactions ?.byMe ?.value ===reactionType ? "active" : ""}data-selected ={reactions ?.byMe ?.value ===reactionType }>{reactionEmojiMap [reactionType ]}</button >))}</div >);constReactionOverview = ({reactions }: {reactions :Reactions }) => (<>{Object .values (reactions ).map ((reaction ) => (<div key ={reaction .by ?.profile ?.name }className ="reaction-row">{reactionEmojiMap [reaction .value asReactionType ]}{" "}{reaction .by ?.profile ?.name }</div >))}</>);
React
Sebastian
No one likes jazz. Not even you.
Mia
I do like jazz now, because of you.
Chat
React
A simple app that creates a chat room with a shareable link.
Rate my pet
React
Image upload
Invite link
Upload a photo of your pet, and invite your friends to react to it.
Todo list
React
Invite link
A todo list where you can collaborate with invited guests.
Password manager
Username | URI | Actions |
---|---|---|
user@gmail.com | gmail.com | Copy password |
user@gmail.com | fb.com | Copy password |
user@gmail.com | x.com | Copy password |
Password manager
React
Passkey auth
A secure password manager, using Passkey for authentication.
take-five.mp3
Music player
React
File upload
Upload your favorite songs, and share them with your friends.
Continue with Touch ID
Passkey
React
Passkey auth
A React app that uses Passkey for authentication
Next.js
Your book shelf
Add book
Book shelf
Next.js
Image upload
Track and rate the books you read, readable by everyone with the link.
React Native
Sebastian
No one likes jazz. Not even you.
Mia
I do like jazz now, because of you.
Chat
React Native
A simple app that creates a chat room with a shareable link.
Vue
Sebastian
No one likes jazz. Not even you.
Mia
I do like jazz now, because of you.
Chat
Vue
A simple app that creates a chat room with a shareable link.
Todo list
Vue
Invite link
A todo list where you can collaborate with invited guests.