Learn-skills.dev webflow-designer-extension
Build Webflow Designer Extensions that run inside the Webflow Designer. Use when creating, debugging, or modifying Designer Extensions (iframes that interact with Webflow's Designer API). Covers CLI usage, element manipulation, styles, components, pages, variables, assets, error handling, and UI design patterns for Webflow's design system.
git clone https://github.com/NeverSight/learn-skills.dev
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/224-industries/webflow-skills/webflow-designer-extension" ~/.claude/skills/neversight-learn-skills-dev-webflow-designer-extension && rm -rf "$T"
data/skills-md/224-industries/webflow-skills/webflow-designer-extension/SKILL.mdWebflow Designer Extension Development
Build extensions that run inside Webflow's Designer as iframes, interacting with the Designer API to manipulate elements, styles, pages, and more.
Quick Start Workflow
Prerequisite: Register your app in Webflow first — see references/register-app.md. You'll need a Workspace with Admin permissions.
- Scaffold:
(interactive prompts for project name, package manager, linter)npx create-webflow-extension@latest - Develop:
(serves at localhost:1337; also works with npm/yarn/bun)cd <name> && pnpm dev - Test: Install app on test site via Workspace Settings > Apps & Integrations > Develop
- Open: Press "E" in Designer to open app panel, launch extension
- Build:
for deploymentpnpm build
CLI Options
npx create-webflow-extension@latest [project-name] [options] Options: --pm <pnpm|npm|yarn|bun> Package manager to use (default: pnpm) --linter <oxlint|biome|eslint> Linter to use --skip-git Skip git initialization --skip-install Skip dependency installation --quiet Suppress output
Core API Patterns
Getting and Setting Elements
// Get selected element const el = await webflow.getSelectedElement(); // Get all elements const elements = await webflow.getAllElements(); // Select element programmatically await webflow.setSelectedElement(element);
Inserting Elements
const selected = await webflow.getSelectedElement(); if (selected) { // Insert siblings await selected.after(webflow.elementPresets.DivBlock); await selected.before(webflow.elementPresets.Paragraph); // Insert children (if element supports children) if (selected.children) { await selected.append(webflow.elementPresets.Image); await selected.prepend(webflow.elementPresets.Heading); } }
Styling Elements
// Create and apply style const style = await webflow.createStyle("MyStyle"); await style.setProperty("background-color", "blue"); await style.setProperty("font-size", "16px"); await element.setStyles([style]); // Responsive styling await style.setProperties( { "font-size": "14px" }, { breakpoint: "medium", pseudo: "hover" } );
User Notifications
await webflow.notify({ type: 'Success', message: 'Element created!' }); await webflow.notify({ type: 'Error', message: 'Please select an element.' });
Element Presets
Common presets via
webflow.elementPresets:
- Layout:
,DivBlock
,Section
,Container
,Grid
,VFlexHFlex - Text:
,Paragraph
,Heading
,TextBlockRichText - Media:
,ImageVideo - Forms:
,FormForm
,FormInputFormButton - Navigation:
,Link
,LinkBlockNavBar - Custom:
(for custom HTML tags)DOM
For elements without presets, use DOM element:
const custom = webflow.elementBuilder(webflow.elementPresets.DOM); custom.setTag("section"); custom.setAttribute("class", "custom-section");
Breakpoints and Pseudo-States
Breakpoints:
"xxl" | "xl" | "large" | "main" | "medium" | "small" | "tiny"
Pseudo-states:
"hover" | "active" | "pressed" | "visited" | "focus" | "focus-visible" | "placeholder" | "first-child" | "last-child" | "nth-child(odd)" | "nth-child(even)"
Error Handling
try { const el = await webflow.getSelectedElement(); await el.remove(); } catch (err) { switch (err.cause?.tag) { case 'ResourceMissing': await webflow.notify({ type: 'Error', message: 'Element not found' }); break; case 'InvalidElementPlacement': await webflow.notify({ type: 'Error', message: 'Cannot place element here' }); break; default: await webflow.notify({ type: 'Error', message: 'An error occurred' }); } }
Common error tags:
DuplicateValue, Forbidden, InternalError, InvalidElementPlacement, InvalidRequest, InvalidStyle, ResourceMissing, VariableInvalid
Project Structure
Generated by
create-webflow-extension (React 19 + TypeScript + Rspack):
my-extension/ ├── public/ │ └── index.html # Entry point ├── src/ │ ├── App.tsx # Main React component │ ├── main.tsx # React entry point │ └── index.css # Styles ├── webflow.json # Extension settings ├── rspack.config.ts # Rspack bundler configuration ├── package.json └── tsconfig.json
Reference Documentation
Each reference file includes YAML frontmatter with
name, description, and tags for searchability. Use the search script to find relevant references quickly:
# List all references with metadata python scripts/search_references.py --list # Search by tag (exact match) python scripts/search_references.py --tag <tag> # Search by keyword (across name, description, tags, and content) python scripts/search_references.py --search <query>
Quick Lookup
- references/designer-apis-reference.md: All APIs and methods in one place (start here)
Detailed Guides
- references/create-webflow-extension-reference.md:
scaffolding CLIcreate-webflow-extension - references/webflow-cli-reference.md: Webflow CLI for serving, bundling, and listing extensions
- references/elements-api.md: Element manipulation and presets
- references/styles-api.md: Styling, breakpoints, pseudo-states
- references/components-api.md: Component definitions and instances
- references/pages-api.md: Page and folder management
- references/variables-api.md: Design variables and collections
- references/assets-api.md: Asset upload and management
- references/extension-utilities.md: Site info, events, notifications, app discovery, authentication
- references/error-handling.md: Error codes and handling patterns
- references/design-guidelines.md: UI design for native Webflow look
- references/register-app.md: Registering a Webflow App and configuring capabilities
- references/marketplace-guidelines.md: Marketplace review criteria (safety, technical, design, branding)
- references/app-submission-and-listing.md: Submitting your app and creating an effective listing
- references/faq.md: FAQ and troubleshooting for extensions, marketplace, and common issues
Scripts
: Quick project initialization wrapper aroundscripts/init-extension.shcreate-webflow-extension
: Validate extension structure before bundlingscripts/validate-extension.py
: Search reference files by tag, keyword, or list all with metadatascripts/search_references.py
Assets
: CSS variables for Webflow's design system colors, typography, and shadowsassets/webflow-variables.css
Best Practices
- Check element capabilities: Always verify
before append/prepend,element.children
before text operationselement.textContent - Handle errors gracefully: Use try/catch with
for user feedbackwebflow.notify() - Responsive design: Test on multiple breakpoints when setting styles
- Use variables: Leverage Webflow's CSS variables for consistent theming
- Subscribe to events: Use Designer events to keep extension state in sync
- Appropriate sizing: Use
for proper panel dimensionswebflow.resizeExtension()