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