Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to share a Figma file with view-only access.
Figma
figmaFile.share({ access: '[1]' }) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'edit' which allows changes instead of just viewing.
Using 'owner' which is for full control, not sharing.
✗ Incorrect
Setting access to view allows others to see the file without editing rights.
2fill in blank
mediumComplete the code to add a user with comment permission to a Figma file.
Figma
figmaFile.addUser('user@example.com', '[1]')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting 'edit' which grants full editing rights.
Choosing 'view' which does not allow commenting.
✗ Incorrect
Using comment permission lets the user add comments but not edit the design.
3fill in blank
hardFix the error in the code to set file permissions correctly.
Figma
figmaFile.setPermissions({ role: '[1]' }) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'viewer' or 'reader' which are not valid roles in Figma.
Confusing 'editor' with view permission.
✗ Incorrect
The correct role keyword in Figma API is view, not 'viewer' or 'reader'.
4fill in blank
hardFill both blanks to share a file with edit permission and notify the user.
Figma
figmaFile.share({ access: '[1]', notify: [2] }) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'view' instead of 'edit' for permission.
Setting notify to false and expecting a notification.
✗ Incorrect
Setting access to edit allows changes, and true sends a notification to the user.
5fill in blank
hardFill all three blanks to remove a user's access and confirm the action.
Figma
figmaFile.removeUser('[1]', { confirm: [2], reason: '[3]' })
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Setting confirm to false and expecting removal.
Leaving reason empty or missing.
✗ Incorrect
Provide the user's email, set confirm to true to confirm removal, and give a reason.