What are plugins?
Plugins allow you to customize the built-in code output or add custom code blocks in TemPad Dev. A plugin is a simple JavaScript file that exports a plugin object, enabling you to:- Transform CSS output to match your design system (e.g., Tailwind, UnoCSS, Stylus)
- Convert CSS variables to alternative formats (e.g., Sass variables, design tokens)
- Generate component code for your specific framework
- Customize pixel-to-rem conversion logic
- Hide or rename built-in code blocks

How plugins work
Plugins run in a Web Worker, so they:- Do not impact performance - they run off the main thread
- Cannot access the DOM - safeguarding security
- Have limited globals - only a safe subset of JavaScript is available
- Extracts the design properties (styles, layout, variables)
- Generates base CSS/JavaScript code
- Passes the data through your plugin’s transform hooks
- Displays the final output in code blocks
Plugin installation
There are two ways to install plugins:By name (built-in plugins)
Use the@{name} syntax for plugins in the official registry:
By URL (custom plugins)
Paste a direct URL to your plugin file:Plugin URLs must support cross-origin requests. GitHub raw URLs and Gists are ideal for this.
Plugin capabilities
Plugins support four powerful hooks:transform
Converts the style object or code into a custom string format.
Use case: Generate Tailwind classes, UnoCSS utilities, or custom CSS frameworks
transformVariable
Converts CSS variables into alternative formats.
Use case: Transform var(--color-primary) to $ui-color-primary for Sass
transformPx
Converts pixel values to other units or applies scaling.
Use case: Custom rem conversion logic or design system-specific scaling
transformComponent
Converts Figma component instances into framework-specific component code.
Use case: Generate React/Vue component invocations with proper props
Simple example
Here’s a minimal plugin that converts CSS to Stylus syntax and hides the JavaScript block:Type safety
Plugins are fully typed when using the@tempad-dev/plugins package:
Next steps
Create a Plugin
Learn how to build your own plugin with the SDK
Deploy a Plugin
Host and share your plugin with others
Available Plugins
Browse the official plugin registry