Skip to content
Misar.io

How to Create a Figma Plugin with AI in 2026 (Step-by-Step Guide)

All articles
Guide

How to Create a Figma Plugin with AI in 2026 (Step-by-Step Guide)

Build a Figma plugin with TypeScript, UI in React, and publish to the Community — AI handles the tricky plugin API quirks.

Misar Team·Aug 27, 2025·3 min read
Table of Contents

Quick Answer

Use the official Figma plugin template with TypeScript and React, scaffold with Cursor, and publish free or paid to the Figma Community. Plugins run in a sandboxed iframe communicating with Figma's scene graph via postMessage.

  • Time to first plugin: 4-6 hours
  • Cost: $0 (free publishing)
  • Stack: TypeScript, React, Figma Plugin API

What You'll Need

  • Figma desktop app (plugins won't run in browser during dev)
  • Node.js 20+, pnpm
  • Cursor or Claude Code
  • Figma account (free)

Steps

  • Clone the template. git clone https://github.com/figma/plugin-samples and pick a React template, or run pnpm create @figma/plugin.
  • Understand the two contexts. code.ts runs in Figma's sandbox with scene graph access. ui.html is an iframe that can use any web tech but can't touch nodes directly — they communicate via postMessage.
  • Build with AI. Prompt Cursor: "In code.ts, create a function that iterates all selected frames and renames them to PascalCase. Send results to UI via postMessage." Then: "Build a React UI that receives results and renders a list."
  • Register in manifest.json. Declare plugin name, API version, main (code.js), ui (ui.html), and commands/menu items.
  • Test locally. In Figma desktop: Plugins → Development → Import plugin from manifest. Changes to code require re-running the plugin.
  • Add AI features responsibly. If calling AI APIs, proxy through a backend. Never ship API keys in the bundle.
  • Publish. Right-click plugin → Publish new plugin. Add icon, cover, description, tags. Review takes 2-5 days.

Common Mistakes

  • Calling Figma APIs from UI: Won't work — only code.ts has scene graph. Use postMessage.
  • Forgetting figma.closePlugin(): Causes memory leaks.
  • Blocking on huge selections: Batch operations every 100 nodes with setTimeout to keep Figma responsive.
  • Shipping large bundles: Figma loads plugins quickly only if under ~500KB.

Top Tools

Tool

Best For

Price

@figma/plugin-typings

TypeScript types

Free

Figma Plugin API docs

Reference

Free

Figma Community

Distribution

Free

Plugma

Vite-based plugin dev

Free

create-figma-plugin

Yeoman alternative

Free

FAQs

Q: Can Figma plugins be paid?

Yes — as of 2024, Figma supports paid plugins via Stripe integration.

Q: Can I access the network?

Only from the UI iframe, and only to allowed origins declared in networkAccess in manifest.

Q: Does my plugin work in Figma Jam and Slides?

You declare editorType in manifest — figma, figjam, or slides.

Q: How do I share plugins privately with a team?

Publish as "Private" — only Figma orgs you share with can install.

Q: Can plugins modify files offline?

No — they run in the Figma client, which requires internet.

Q: What's the bundle size limit?

Technically ~4MB, but aim for under 1MB for instant loads.

Conclusion

Figma plugins are a high-leverage way to reach designers. Solve one repetitive design pain — renaming, color swapping, handoff — and build a following. AI makes the scene graph API painless.

figma-plugintypescriptai-codingdesign-toolscursor
Enjoyed this article? Share it with others.

More to Read

View all posts
Guide

How to Train an AI Chatbot on Website Content Safely

Website content is one of the richest sources of information your business has. Every help article, FAQ, service description, and policy page is a direct line to your customers’ most pressing questions—yet most of this d

9 min read
Guide

E-commerce AI Assistants: Use Cases That Actually Drive Revenue

E-commerce is no longer just about transactions—it’s about personalized experiences, instant support, and frictionless journeys. Today’s shoppers expect more than just a website; they want a concierge that understands th

11 min read
Guide

What a Healthcare AI Assistant Needs Before Launch

Healthcare AI isn’t just about algorithms—it’s about trust. Patients, clinicians, and regulators all need to believe that your AI assistant will do more than talk; it will listen, remember, and act responsibly when it ma

12 min read
Guide

Website AI Chat Widgets: What Converts Better Than Generic Bots

Website AI chat widgets have become a staple for SaaS companies looking to engage visitors, answer questions, and drive conversions. Yet, most chat widgets still rely on generic, rule-based bots that frustrate users with

11 min read

Explore Misar AI Products

From AI-powered blogging to privacy-first email and developer tools — see how Misar AI can power your next project.

Stay in the loop

Follow our latest insights on AI, development, and product updates.

Get Updates