Widget Samples
Sample widgets!
Widgets
Widget Counter
A simple counter widget that showcases <Frame>
, <Text>
, useSyncedState
, usePropertyMenu
, and onClick
.
Widget Notepad
A widget that showcases opening an iframe to get additional user input and the useEffect
hook.
Widget UserBadge
A widget that makes use of <Image>
and figma.currentUser.photoUrl
.
Widget Table
A simple table widget that showcases useSyncedMap
to support concurrent updates to the widget and the key
prop.
Widget Multiplayer Counter
A multiplayer-safe counter widget that uses useSyncedMap
and figma.activeUsers[0].sessionId
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.