ymichael / widget-samples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Widget Samples

Sample widgets!

Widgets

Widget Counter

A simple counter widget that showcases <Frame>, <Text>, useSyncedState, usePropertyMenu, and onClick.

Counter Widget

Widget Notepad

A widget that showcases opening an iframe to get additional user input and the useEffect hook.

Notepad Widget

Widget UserBadge

A widget that makes use of <Image> and figma.currentUser.photoUrl.

UserBadge Widget

Widget Table

A simple table widget that showcases useSyncedMap to support concurrent updates to the widget and the key prop.

Table Widget

Widget Multiplayer Counter

A multiplayer-safe counter widget that uses useSyncedMap and figma.activeUsers[0].sessionId

Multiplayer Counter Widget

create-widget-app

An template widget that opens an iframe whose contents is rendered using React. This mainly serves to demonstrate how to structure code for non-trivial widgets and their iframes.

About


Languages

Language:TypeScript 89.6%Language:JavaScript 6.0%Language:CSS 2.5%Language:HTML 1.9%