mcpField
W
webflow-code-components

webflow-code-components

github.com/224-industriesDevelopment1077 installsUpdated 1w ago
Repository

About webflow-code-components

webflow-code-components is a skill for building React code components and sharing them with Webflow through DevLink. It serves developers composing interactive components visually on the Webflow canvas.

Key features

  1. 01Define components with declareComponent
  2. 02Shadow DOM style isolation
  3. 03Server-side rendering by default
  4. 04Typed component properties
  5. 05Bundle and share libraries with Webflow CLI

Use cases

  1. 01Publish React components for Webflow sites
  2. 02Configure component properties for canvas editing
  3. 03Build isolated components with server rendering

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/224-industries/webflow-skills --skill webflow-code-components

After installing, type/webflow-code-componentsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
bundling-and-import.md
cli.md
component-architecture.md
define-code-component.md
faq.md
frameworks-and-libraries.md
hooks.md
installation.md
introduction.md
prop-types.md
quick-start.md
styling-components.md
references/prop-types/
boolean.md
id.md
image.md
link.md
number.md
rich-text.md
slot.md
text-node.md
text.md
variant.md
visibility.md
scripts/
search_references.py

Details

From the project README

Webflow Code Components

Build, define, and import React code components into Webflow using DevLink. Code components let you develop advanced, interactive React components in your codebase and deploy them to Webflow as shared libraries for visual composition on the canvas.

Quick Start

Prerequisite: Webflow Workspace on Freelancer, Core, Growth, Agency, or Enterprise plan (or a site on CMS, Business, or Enterprise). Node.js 20+ and npm 10+.

  1. Set up your project — Install the CLI and dependencies
  2. Create a React component — Build your standard React component
  3. Define the code component — Create a .webflow.tsx file with declareComponent
  4. Import to Webflow — Run npx webflow library share
  5. Use on canvas — Install the library on a site, then drag and drop components

See references/quick-start.md for a full end-to-end tutorial.

Key Concepts

  • Shadow DOM isolation — Styles and DOM are sandboxed per component
  • Separate React roots — No shared React Context or state between components. Use URL params, browser storage, Nano Stores, or custom events
  • SSR by default — Server-rendered HTML is hydrated on the client. Disable with ssr: false for browser-only components
  • declareComponent — Defines how your React component appears in Webflow. See references/hooks.md for the full API
  • Prop types — 11 types available (Text, Rich Text, Text Node, Link, Image, Number, Boolean, Variant, Visibility, Slot, ID)
  • Bundling — Webpack bundles your library (50MB max)

Important Notes

  • File names are unique identifiers. Renaming a .webflow.tsx file creates a new component and removes the old one — existing instances on sites will break.
  • React Server Components are not supported. Use standard React components only.
  • Components can fetch data client-side, but APIs must support CORS and you must never embed API keys in component code.

Reference Documentation

Each reference file includes YAML frontmatter with name, description, and tags for searchability. Use the search script in scripts/search_references.py to find relevant references.

Getting Started
Building Components
Prop Types
Bundling & CLI
Help
  • references/faq.md: Frequently asked questions — setup, styling, imports, troubleshooting, performance
Searching References
# 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>

# Search only prop type references
python scripts/search_references.py --prop-types
python scripts/search_references.py --prop-types --tag <tag>
python scripts/search_references.py --prop-types --search <query>

Scripts

  • scripts/search_references.py: Search reference files by tag, keyword, or list all with metadata

Comments

Markdown supported