• Stars
    star
    264
  • Rank 155,103 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A boilerplate for creating Figma plugins with Svelte

Figsvelte

A boilerplate for creating Figma plugins using Svelte.

This starter project has everything you need to start developing a Figma plugin usign Svelte. Your JS, CSS, SVG and image assets can be bundled on build. The package will take care of compiling your typescript + app on save during development, and also minify on build.

Additionally, this package comes preconfigured with Figma Plugin DS Svelte where you have access to a large range of components and icons that match the Figma UI, to get you up and running quickly. Note: installing this boilerplate will install the component library as a dependency.

Only what you import/use will be included in the final build for small bundle size.

To get started

npx degit thomas-lowry/figsvelte figma-plugin
cd figma-plugin
npm install

Note that you will need to have Node.js installed.

Connecting your plugin to Figma

Connecting your plugin to Figma After installing, go to Plugins / Development / New Plugin in the Figma desktop app for Mac OS or Windows and choose the option "Link existing plugin".

You also can just type "New Plugin" in Figma global search to go there

From there you need to link a manifest.json file located at public folder in your directory:

/figma-plugin/public/manifest.json

Now edit this file to give a new name for your plugin, and you will be able call it from Figma: Plugins / Development / Your Plugin Name

Development

During development, watch your project for changes with the following command.

npm run dev

Start building your plugin UI in 'src/Plugin.svelte'.

Build

When ready to package up your final Figma Plugin:

npm run build

Useful info

To include an external CSS file:

import styles from "./styles.css";

To include an SVG:

import SvgName from './image.svg';

//use in your markup
{@html SvgName}

For more info on using the Icon component system with SVGs from Figma Plugin DS Svelte, refer to the repo.

For info about Figma API visit Figma API Overview

More Repositories

1

figma-plugin-ds

A small lightweight design system for use in Figma Plugins
SCSS
693
star
2

figma-plugin-ds-svelte

Figma Plugin DS components made with Svelte
JavaScript
180
star
3

themer

A Figma plugin designed to allow you to swap between styles named the same from different published libraries.
Svelte
128
star
4

figma-plugin-boilerplate

A boilerplate for creating Figma Plugins with html, css and vanilla javascript without frameworks
JavaScript
79
star
5

status-annotations

A Figma plugin for indicating the status of work
JavaScript
39
star
6

component-to-page

A small utility plugin for Figma to mimic Sketch's behaviour to move new master components to a dedicated page
JavaScript
19
star
7

edit-in-place

A utility plugin for Figma that lets you select an instance, and edit the master component in place.
JavaScript
13
star
8

sorter

A small utility plugin to help you sort/re-order layers in Figma
HTML
13
star
9

connecter

A Figma plugin that automates prototype interactions for building slides in Figma
JavaScript
11
star
10

send-to-top

A small utility plugin for Figma that will take any selection and send it to the top of the layer stack.
JavaScript
5
star
11

layout-grid-visualizer

A Figma plugin to generate layers from your layout gridv (useful for creating grid documentation)
JavaScript
5
star
12

superscript

A Figma plugin for superscripting characters
JavaScript
4
star
13

nester

A utility plugin to nest any object that sits above a top-level frame.
JavaScript
3
star
14

file-explorer

A Figma plugin for in-file analytics that helps you navigate instances of components and styles.
HTML
2
star
15

dice

Roll virtual dice in figma
JavaScript
1
star
16

hex-values-from-solid-fills

Small utility to list out all hex values (only works with solid fills)
JavaScript
1
star