A collection of helpers for Figma plugins and widgets.
Install using the following.
npm install @fignite/helpersInclude helpers in your main code.
// main.ts
import { getPageNode } from '@fignite/helpers'
figma.on('selectionchange', () => {
const selection = figma.currentPage.selection
if (selection.length === 0) return
const pageNode = getPageNode(selection[0])
console.log(pageNode)
})You can see a list of the helpers inside packages/helpers/src.
If you'd like to contribute, please see the contributing guidelines.