flowkit-naming by webflow/webflow-skills
npx skills add https://github.com/webflow/webflow-skills --skill flowkit-naming使用 Webflow Designer 工具在 Webflow 项目中应用 FlowKit CSS 命名规范。
始终使用 Webflow MCP 工具进行所有操作:
webflow_guide_tool 获取最佳实践data_sites_tool 并执行 list_sites 操作来识别目标站点de_page_tool 获取当前页面并切换页面element_tool 选择元素并检查当前类style_tool 创建和更新符合 FlowKit 规范的样式de_learn_more_about_styles 了解支持的样式属性广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
context 参数(15-25 个单词,第三人称视角)de_page_tool 识别当前工作页面element_tool 检索当前页面元素fk- 前缀
* 大小写错误(大写/混合大小写)
* 分隔符错误(使用下划线而非连字符)
* 非语义化命名
* 组件结构不一致fk-[component]
* 子元素:fk-[component]-[element]
* 状态修饰符:使用 is-[state] 的组合类
* 布局工具类:fk-flex、fk-grid、fk-stack
* 间距工具类:fk-space-[size]、fk-py-[size]、fk-px-[size]
* 排版工具类:fk-text-[style]style_tool 创建新的符合 FlowKit 规范的类样式element_tool 将类应用到元素| 模式 | 用途 | 示例 |
|---|---|---|
fk-[component] | 组件包装器(基类) | fk-card、fk-nav、fk-hero |
fk-[component]-[element] | 组件内的子元素 | fk-card-title、fk-nav-link |
fk-[component].[modifier] | 组合类修饰符(状态/变体) | fk-card.is-featured |
fk-text-[style] | 排版工具类 | fk-text-xl、fk-text-bold |
fk-flex / fk-grid | 布局工具类 | fk-flex-center、fk-grid-3 |
fk-space-[size] | 间距工具类 | fk-space-md、fk-py-lg |
is-[state] | 状态修饰符(组合类) | is-active、is-hidden、is-disabled |
fk-section 带内边距的区域包装器
fk-container 最大宽度容器(居中)
fk-flex Flexbox 容器
fk-flex-center 居中的 flex(双轴)
fk-flex-between 两端对齐的 flex
fk-flex-around 均匀分布的 flex
fk-flex-col Flex 列方向
fk-grid 网格容器(基础)
fk-grid-2 2 列网格
fk-grid-3 3 列网格
fk-grid-4 4 列网格
fk-grid-6 6 列网格
fk-stack 垂直堆叠(项目间有间隙)
fk-row 水平行
fk-wrap 启用 Flex 换行
fk-text-xs 超小文本(12px)
fk-text-sm 小文本(14px)
fk-text-md 中等文本(16px - 默认)
fk-text-lg 大文本(18px)
fk-text-xl 超大文本(24px)
fk-text-2xl 2 倍大文本(32px)
fk-text-3xl 3 倍大文本(48px)
fk-text-bold 粗体字重(700)
fk-text-semibold 半粗体字重(600)
fk-text-medium 中等字重(500)
fk-text-light 细体字重(300)
fk-text-center 居中对齐
fk-text-left 左对齐
fk-text-right 右对齐
fk-text-uppercase 大写转换
fk-text-lowercase 小写转换
fk-text-capitalize 首字母大写转换
fk-space-xs 4px 间距
fk-space-sm 8px 间距
fk-space-md 16px 间距(默认)
fk-space-lg 24px 间距
fk-space-xl 32px 间距
fk-space-2xl 48px 间距
fk-space-3xl 64px 间距
方向性间距:
fk-py-[size] 垂直内边距(上 + 下)
fk-px-[size] 水平内边距(左 + 右)
fk-pt-[size] 上内边距
fk-pb-[size] 下内边距
fk-pl-[size] 左内边距
fk-pr-[size] 右内边距
fk-my-[size] 垂直外边距(上 + 下)
fk-mx-[size] 水平外边距(左 + 右)
fk-mt-[size] 上外边距
fk-mb-[size] 下外边距
fk-ml-[size] 左外边距
fk-mr-[size] 右外边距
fk-bg-primary 主背景色
fk-bg-secondary 次背景色
fk-bg-accent 强调背景色
fk-bg-light 浅色背景
fk-bg-dark 深色背景
fk-text-primary 主文本色
fk-text-secondary 次文本色
fk-text-muted 弱化文本色
fk-rounded 边框圆角(默认)
fk-rounded-sm 小边框圆角
fk-rounded-lg 大边框圆角
fk-rounded-full 完全圆角(药丸/圆形)
fk-border 边框(1px 实线)
fk-border-top 仅上边框
fk-border-bottom 仅下边框
fk-shadow 盒子阴影(默认)
fk-shadow-sm 小阴影
fk-shadow-lg 大阴影
is-active 激活状态(导航、标签页)
is-hidden 隐藏可见性
is-visible 可见(覆盖隐藏)
is-disabled 禁用状态
is-loading 加载状态
is-error 错误状态
is-success 成功状态
is-primary 主变体
is-secondary 次变体
is-featured 特色/高亮变体
is-horizontal 水平布局变体
is-vertical 垂直布局变体
用户提示:
Build a hero section with FlowKit naming
步骤 1:分析
🎨 FlowKit Hero 区域结构
我将按照 FlowKit v2 规范创建一个 hero 区域。
结构:
fk-section (带内边距的包装器)
└── fk-container (最大宽度容器)
└── fk-hero (组件包装器)
├── fk-hero-content + fk-flex + fk-flex-col + fk-flex-center
│ ├── fk-hero-eyebrow + fk-text-sm + fk-text-uppercase + fk-mb-sm
│ ├── fk-hero-title + fk-text-3xl + fk-text-bold + fk-mb-md
│ ├── fk-hero-subtitle + fk-text-lg + fk-text-muted + fk-mb-lg
│ └── fk-hero-actions + fk-flex + fk-space-md
│ ├── fk-button.is-primary
│ └── fk-button.is-secondary
└── fk-hero-image + fk-rounded-lg
要创建的类总数:12 个基类 + 2 个组合类
准备在 Webflow Designer 中创建这些吗?(是/否)
步骤 2:用户确认后
🔄 正在创建 FlowKit Hero 类...
进度:████████████████████ 100% (14/14 个类)
✅ 已创建的类:
**布局类:**
- ✅ fk-section - 带内边距的区域包装器
- ✅ fk-container - 最大宽度容器
- ✅ fk-hero - Hero 组件包装器
**元素类:**
- ✅ fk-hero-content - Hero 内容容器
- ✅ fk-hero-eyebrow - 标题上方的小标签
- ✅ fk-hero-title - 主 hero 标题
- ✅ fk-hero-subtitle - 支持性文本
- ✅ fk-hero-actions - 按钮容器
- ✅ fk-hero-image - Hero 图像包装器
**工具类:**
- ✅ fk-flex, fk-flex-col, fk-flex-center
- ✅ fk-text-sm, fk-text-lg, fk-text-3xl
- ✅ fk-text-uppercase, fk-text-bold, fk-text-muted
- ✅ fk-mb-sm, fk-mb-md, fk-mb-lg
- ✅ fk-space-md, fk-rounded-lg
**组件类:**
- ✅ fk-button (带组合类:is-primary, is-secondary)
---
📋 使用指南:
1. 创建一个 Section 元素 → 应用 `fk-section`
2. 在内部添加 Container → 应用 `fk-container`
3. 在内部添加 Div → 应用 `fk-hero`
4. 按照上述层次结构构建内容结构
5. 使用组合类处理按钮变体:`fk-button.is-primary`
🎉 您的 FlowKit hero 区域结构已准备就绪!
用户提示:
Check these classes: feature-card, FK-Button, fk_hero_title, cardTitle
响应:
📋 FlowKit 审计报告
根据 FlowKit v2 规范检查 4 个类...
---
## 发现的问题:4 个
### 1. `feature-card` ⚠️
**问题:** 缺少 FlowKit 前缀
**原因:** 所有 FlowKit 类必须以 `fk-` 开头
**建议:** `fk-feature-card` 或 `fk-card.is-feature`
**修复:** 重命名类以包含 `fk-` 前缀
### 2. `FK-Button` ❌
**问题:** 大小写错误(大写)
**原因:** FlowKit 仅使用小写
**建议:** `fk-button`
**修复:** 转换为小写:`fk-button`
### 3. `fk_hero_title` ❌
**问题:** 分隔符错误(下划线)
**原因:** FlowKit 使用连字符,而非下划线
**建议:** `fk-hero-title`
**修复:** 将下划线替换为连字符
### 4. `cardTitle` ❌
**问题:** 多个违规
- 缺少 `fk-` 前缀
- 使用驼峰命名法而非短横线命名法
**原因:** FlowKit 要求 `fk-` 前缀和连字符分隔
**建议:** `fk-card-title`
**修复:** 添加前缀并转换为短横线命名法
---
## FlowKit 命名规则:
✅ **正确的模式:**
- `fk-card` (组件)
- `fk-card-title` (元素)
- `fk-button.is-primary` (带修饰符)
- `fk-text-xl` (工具类)
❌ **错误的模式:**
- `card` (无前缀)
- `FK-Card` (大小写错误)
- `fk_card` (分隔符错误)
- `cardTitle` (驼峰命名法)
您想在 Webflow Designer 中重命名这些类吗?(是/否)
用户提示:
Create a product card component with FlowKit classes
响应:
🎨 FlowKit 产品卡片组件
结构:
fk-card (基础组件)
├── fk-card-image-wrapper
│ └── fk-card-image + fk-rounded-lg
├── fk-card-badge + fk-text-xs + fk-text-uppercase + fk-bg-accent
├── fk-card-content + fk-space-md
│ ├── fk-card-category + fk-text-sm + fk-text-muted
│ ├── fk-card-title + fk-text-lg + fk-text-bold
│ ├── fk-card-description + fk-text-md
│ └── fk-card-price + fk-text-xl + fk-text-bold + fk-text-primary
└── fk-card-footer + fk-flex + fk-flex-between + fk-pt-md + fk-border-top
├── fk-card-rating + fk-flex + fk-space-xs
└── fk-button.is-primary + fk-text-sm
---
## 变体(组合类):
### 特色卡片
`fk-card.is-featured`
- 高亮边框/阴影
- 强调背景色
- 用于推广产品
### 水平布局
`fk-card.is-horizontal`
- 图像/内容并排
- 更适合列表视图
- 图像在左,内容在右
### 紧凑尺寸
`fk-card.is-compact`
- 减少内边距
- 较小的文本尺寸
- 用于紧凑布局
---
## 响应式修饰符:
桌面(默认):
- `fk-grid-3` (每行 3 张卡片)
平板:
- 添加组合:`fk-grid-3.tablet-2`
移动端:
- 添加组合:`fk-grid-3.tablet-2.mobile-1`
---
准备创建这些类吗?(是/否)
用户提示:
Refactor my navigation to use FlowKit naming
步骤 1:当前分析
🔍 正在分析当前导航类...
发现 8 个元素使用非 FlowKit 类:
├── navbar → fk-nav
├── navbar-container → fk-nav-container
├── logo-wrapper → fk-nav-logo
├── menu → fk-nav-menu
├── menu-item → fk-nav-link
├── menu-item active → fk-nav-link.is-active
├── button-group → fk-nav-actions
└── btn-primary → fk-button.is-primary
---
## 迁移计划:
**阶段 1:创建 FlowKit 类** (8 个类)
- 创建所有 `fk-nav-*` 类
- 创建工具类:`fk-flex`、`fk-flex-between`、`fk-flex-center`
- 创建带 `is-primary` 修饰符的 `fk-button`
**阶段 2:更新元素** (8 个元素)
- 将旧类替换为新的 FlowKit 类
- 在需要的地方应用组合类
- 保留现有样式
**阶段 3:清理** (可选)
- 验证后可以删除旧类
- 暂时保留以保持向后兼容性
---
继续迁移吗?(是/否)
步骤 2:迁移后
✅ 导航已重构为 FlowKit
**创建的类:** 8
**更新的元素:** 8
**耗时:** ~3 秒
---
## 更新后的结构:
fk-nav
├── fk-nav-container + fk-flex + fk-flex-between
│ ├── fk-nav-logo
│ ├── fk-nav-menu + fk-flex + fk-flex-center + fk-space-md
│ │ ├── fk-nav-link (x5)
│ │ └── fk-nav-link.is-active (当前页面)
│ └── fk-nav-actions + fk-flex + fk-space-sm
│ ├── fk-button.is-secondary
│ └── fk-button.is-primary
---
## 之前 → 之后:
| 旧类 | 新的 FlowKit 类 |
|-----------|-------------------|
| navbar | fk-nav ✅ |
| navbar-container | fk-nav-container ✅ |
| logo-wrapper | fk-nav-logo ✅ |
| menu | fk-nav-menu ✅ |
| menu-item | fk-nav-link ✅ |
| menu-item active | fk-nav-link.is-active ✅ |
| button-group | fk-nav-actions ✅ |
| btn-primary | fk-button.is-primary ✅ |
---
🎉 导航现在符合 FlowKit 规范!
**后续步骤:**
- 在所有断点上测试导航
- 验证激活状态是否正常工作
- 考虑为透明标题变体添加 `fk-nav.is-transparent`
- 考虑为粘性导航添加 `fk-nav.is-sticky`
FlowKit 前缀规则:
fk- 开头is- 前缀(作为组合类)大小写敏感性:
分隔符规则:
-)分隔单词_)命名结构:
组件: fk-[component]
元素: fk-[component]-[element]
子元素: fk-[component]-[element]-[detail]
工具类: fk-[property]-[value]
状态修饰符: is-[state] (仅作为组合类)
响应式: .[breakpoint]-[value] (组合类)
组件名称:
card、nav、hero、footerfk-card 而非 fk-product-feature-cardfk-card.is-featured 而非 fk-card-featured元素层次结构:
fk-cardfk-card-[element] (例如:fk-card-title)fk-card-content-section-text-wrapperfk-card-content、fk-card-text常见组件模式:
卡片:
fk-card
├── fk-card-image
├── fk-card-content
│ ├── fk-card-title
│ └── fk-card-text
└── fk-card-footer
导航:
fk-nav
├── fk-nav-logo
├── fk-nav-menu
│ └── fk-nav-link
└── fk-nav-actions
Hero:
fk-hero
├── fk-hero-content
│ ├── fk-hero-title
│ ├── fk-hero-subtitle
│ └── fk-hero-actions
└── fk-hero-media
表单:
fk-form
├── fk-form-group
│ ├── fk-form-label
│ └── fk-form-input
└── fk-form-actions
工具类命名:
fk-[property]-[value]fk-text-lg、fk-space-md、fk-grid-3间距工具类:
xs、sm、md、lg、xl、2xl、3xlpy (垂直)、px (水平)、pt (上)、pr (右)、pb (下)、pl (左)my、mx、mt、mr、mb、ml排版工具类:
fk-text-[xs|sm|md|lg|xl|2xl|3xl]fk-text-[light|medium|semibold|bold]fk-text-[left|center|right]fk-text-[uppercase|lowercase|capitalize]布局工具类:
fk-flex、fk-flex-col、fk-flex-center、fk-flex-betweenfk-grid、fk-grid-2、fk-grid-3、fk-grid-4、fk-grid-6fk-container、fk-section状态修饰符规则:
is- 前缀作为组合类<div class="fk-button is-primary">...</div>常见状态:
is-active 当前激活/选中
is-disabled 禁用交互
is-hidden 隐藏可见性
is-visible 可见(覆盖隐藏)
is-loading 加载状态
is-error 错误状态
is-success 成功状态
is-primary 主变体
is-secondary 次变体
is-tertiary 第三变体
is-featured 特色/高亮
is-horizontal 水平布局
is-vertical 垂直布局
is-expanded 展开状态(手风琴、下拉菜单)
is-collapsed 折叠状态
在 Webflow 中应用组合类:
fk-buttonis-primaryfk-button is-primary.fk-button.is-primary { ... }响应式修饰符:
.[breakpoint]-[value]fk-grid-4.tablet-2.mobile-1断点:
桌面(默认): 无需修饰符
平板: .tablet-[value]
移动端: .mobile-[value]
响应式网格示例:
基础: fk-grid-4 (桌面端 4 列)
+ 组合: .tablet-2 (平板端 2 列)
+ 组合: .mobile-1 (移动端 1 列)
结果: <div class="fk-grid-4 tablet-2 mobile-1">
响应式文本示例:
基础: fk-text-3xl (桌面端 48px)
+ 组合: .tablet-2xl (平板端 32px)
+ 组合: .mobile-xl (移动端 24px)
结果: <div class="fk-text-3xl tablet-2xl mobile-xl">
始终:
fk- 前缀fk-flex fk-flex-center fk-space-md)切勿:
fk- 前缀组件与工具类:
在以下情况下使用组件:
fk-card、fk-nav、fk-hero在以下情况下使用工具类:
fk-text-lg、fk-space-md、fk-flex-center工具类堆叠: 工具类可以自由组合:
<div class="fk-flex fk-flex-center fk-space-md fk-py-lg">
内容
</div>
组件 + 工具类组合:
<div class="fk-card fk-shadow-lg fk-rounded-lg">
<div class="fk-card-content fk-space-lg">
<h3 class="fk-card-title fk-text-xl fk-text-bold">标题</h3>
</div>
</div>
错误 1:缺少前缀
❌ card, button, nav
✅ fk-card, fk-button, fk-nav
错误 2:大小写错误
❌ FK-Card, fk-Button, Fk-nav
✅ fk-card, fk-button, fk-nav
错误 3:分隔符错误
❌ fk_card_title, fk.card.title
✅ fk-card-title
错误 4:驼峰命名法/帕斯卡命名法
❌ fkCardTitle, FkCardTitle
✅ fk-card-title
错误 5:修饰符作为独立类
❌ <div class="fk-button-primary">
✅ <div class="fk-button is-primary">
错误 6:嵌套过多
❌ fk-hero-content-wrapper-section-title-text
✅ fk-hero-content, fk-hero-title
错误 7:名称过于具体
❌ fk-product-feature-card-with-image-and-price
✅ fk-card (使用组合:is-product)
错误 8:错误的响应式模式
❌ fk-grid-3-tablet-2 (单个类)
✅ fk-grid-3 tablet-2 (两个类)
FlowKit v2(当前):
v2 主要变更:
fk- 前缀is- 前缀用于状态修饰符(组合类).tablet-、.mobile-)从 v1 迁移: 如果用户有 v1 FlowKit 类:
fk- 前缀is- 组合类类创建:
style_tool 以 10-15 个类为一批元素更新:
Designer 连接:
常见错误:
1. Designer 未连接:
❌ 错误:无法创建类 - Designer 未连接
解决方案:
1. 打开 Webflow Designer
2. 打开目标站点
3. 在 Claude Code 中连接到 Designer
4. 重试操作
2. 类已存在:
⚠️ 警告:类 'fk-button' 已存在
选项:
1. 跳过创建(使用现有的)
2. 更新现有类
3. 使用不同的名称创建
3. 无效的类名:
❌ 错误:类名 'fk-My Button' 无效
问题:
- 包含空格
- 包含大写字母
建议:'fk-my-button'
4. 样式属性不支持:
⚠️ 警告:属性 'custom-property' 不支持
这可能是:
- 自定义 CSS 属性
- Webflow 不支持通过 Designer API
- 属性名拼写错误
建议:在 Designer 中手动应用
情况 1:第三方集成类 如果与第三方库集成(例如动画、滑块):
<div class="fk-slider"><div class="swiper">...</div></div>情况 2:遗留代码迁移 迁移大型现有站点时:
情况 3:自定义命名要求 如果客户有现有的命名系统:
情况 4:组件库冲突 如果站点使用另一个框架(Bootstrap、Tailwind):
情况 5:工具类爆炸 如果单个元素上工具类过多:
fk-flex fk-flex-center fk-space-md fk-py-lg fk-px-xl fk-rounded-lg fk-shadowfk-panel 并内置这些属性在认为 FlowKit 实施完成之前:
设置:
组件结构:
fk- 前缀is- 前缀的组合类工具类:
响应式:
状态:
文档:
**验证
Apply FlowKit CSS naming conventions in Webflow projects using Webflow Designer tools.
ALWAYS use Webflow MCP tools for all operations:
webflow_guide_tool to get best practices before startingdata_sites_tool with action list_sites to identify the target sitede_page_tool to get current page and switch pageselement_tool to select elements and inspect current classesstyle_tool to create and update FlowKit-compliant stylesde_learn_more_about_styles to understand supported style propertiescontext parameter (15-25 words, third-person perspective)de_page_tool to identify current working pageelement_tool to retrieve current page elementsfk- prefixfk-[component]
* Child elements: fk-[component]-[element]
* State modifiers: combo classes with is-[state]
* Layout utilities: fk-flex, fk-grid, fk-stack
* Spacing utilities: fk-space-[size], fk-py-[size], fk-px-[size]
* Typography utilities: fk-text-[style]style_tool to create new FlowKit-compliant class styleselement_tool to apply classes to elements| Pattern | Purpose | Example |
|---|---|---|
fk-[component] | Component wrapper (base class) | fk-card, fk-nav, fk-hero |
fk-[component]-[element] | Child element within component | fk-card-title, fk-nav-link |
fk-[component].[modifier] |
fk-section Section wrapper with padding
fk-container Max-width container (centered)
fk-flex Flexbox container
fk-flex-center Centered flex (both axes)
fk-flex-between Space-between flex
fk-flex-around Space-around flex
fk-flex-col Flex column direction
fk-grid Grid container (base)
fk-grid-2 2-column grid
fk-grid-3 3-column grid
fk-grid-4 4-column grid
fk-grid-6 6-column grid
fk-stack Vertical stack (gap between items)
fk-row Horizontal row
fk-wrap Flex wrap enabled
fk-text-xs Extra small text (12px)
fk-text-sm Small text (14px)
fk-text-md Medium text (16px - default)
fk-text-lg Large text (18px)
fk-text-xl Extra large text (24px)
fk-text-2xl 2x large text (32px)
fk-text-3xl 3x large text (48px)
fk-text-bold Bold weight (700)
fk-text-semibold Semibold weight (600)
fk-text-medium Medium weight (500)
fk-text-light Light weight (300)
fk-text-center Center aligned
fk-text-left Left aligned
fk-text-right Right aligned
fk-text-uppercase Uppercase transform
fk-text-lowercase Lowercase transform
fk-text-capitalize Capitalize transform
fk-space-xs 4px spacing
fk-space-sm 8px spacing
fk-space-md 16px spacing (default)
fk-space-lg 24px spacing
fk-space-xl 32px spacing
fk-space-2xl 48px spacing
fk-space-3xl 64px spacing
Directional Spacing:
fk-py-[size] Padding vertical (top + bottom)
fk-px-[size] Padding horizontal (left + right)
fk-pt-[size] Padding top
fk-pb-[size] Padding bottom
fk-pl-[size] Padding left
fk-pr-[size] Padding right
fk-my-[size] Margin vertical (top + bottom)
fk-mx-[size] Margin horizontal (left + right)
fk-mt-[size] Margin top
fk-mb-[size] Margin bottom
fk-ml-[size] Margin left
fk-mr-[size] Margin right
fk-bg-primary Primary background color
fk-bg-secondary Secondary background color
fk-bg-accent Accent background color
fk-bg-light Light background
fk-bg-dark Dark background
fk-text-primary Primary text color
fk-text-secondary Secondary text color
fk-text-muted Muted text color
fk-rounded Border radius (default)
fk-rounded-sm Small border radius
fk-rounded-lg Large border radius
fk-rounded-full Fully rounded (pill/circle)
fk-border Border (1px solid)
fk-border-top Border top only
fk-border-bottom Border bottom only
fk-shadow Box shadow (default)
fk-shadow-sm Small shadow
fk-shadow-lg Large shadow
is-active Active state (navigation, tabs)
is-hidden Hidden visibility
is-visible Visible visibility
is-disabled Disabled state
is-loading Loading state
is-error Error state
is-success Success state
is-primary Primary variant
is-secondary Secondary variant
is-featured Featured/highlighted variant
is-horizontal Horizontal layout variant
is-vertical Vertical layout variant
User prompt:
Build a hero section with FlowKit naming
Step 1: Analysis
🎨 FlowKit Hero Section Structure
I'll create a hero section following FlowKit v2 conventions.
Structure:
fk-section (wrapper with padding)
└── fk-container (max-width container)
└── fk-hero (component wrapper)
├── fk-hero-content + fk-flex + fk-flex-col + fk-flex-center
│ ├── fk-hero-eyebrow + fk-text-sm + fk-text-uppercase + fk-mb-sm
│ ├── fk-hero-title + fk-text-3xl + fk-text-bold + fk-mb-md
│ ├── fk-hero-subtitle + fk-text-lg + fk-text-muted + fk-mb-lg
│ └── fk-hero-actions + fk-flex + fk-space-md
│ ├── fk-button.is-primary
│ └── fk-button.is-secondary
└── fk-hero-image + fk-rounded-lg
Total classes to create: 12 base classes + 2 combo classes
Ready to create these in Webflow Designer? (yes/no)
Step 2: After user confirms
🔄 Creating FlowKit Hero Classes...
Progress: ████████████████████ 100% (14/14 classes)
✅ Classes Created:
**Layout Classes:**
- ✅ fk-section - Section wrapper with padding
- ✅ fk-container - Max-width container
- ✅ fk-hero - Hero component wrapper
**Element Classes:**
- ✅ fk-hero-content - Hero content container
- ✅ fk-hero-eyebrow - Small label above title
- ✅ fk-hero-title - Main hero heading
- ✅ fk-hero-subtitle - Supporting text
- ✅ fk-hero-actions - Button container
- ✅ fk-hero-image - Hero image wrapper
**Utility Classes:**
- ✅ fk-flex, fk-flex-col, fk-flex-center
- ✅ fk-text-sm, fk-text-lg, fk-text-3xl
- ✅ fk-text-uppercase, fk-text-bold, fk-text-muted
- ✅ fk-mb-sm, fk-mb-md, fk-mb-lg
- ✅ fk-space-md, fk-rounded-lg
**Component Classes:**
- ✅ fk-button (with combo classes: is-primary, is-secondary)
---
📋 Usage Guide:
1. Create a Section element → Apply `fk-section`
2. Add Container inside → Apply `fk-container`
3. Add Div inside → Apply `fk-hero`
4. Build content structure following the hierarchy above
5. Use combo classes for button variants: `fk-button.is-primary`
🎉 Your FlowKit hero section structure is ready!
User prompt:
Check these classes: feature-card, FK-Button, fk_hero_title, cardTitle
Response:
📋 FlowKit Audit Report
Checking 4 classes against FlowKit v2 conventions...
---
## Issues Found: 4
### 1. `feature-card` ⚠️
**Issue:** Missing FlowKit prefix
**Reason:** All FlowKit classes must start with `fk-`
**Suggested:** `fk-feature-card` or `fk-card.is-feature`
**Fix:** Rename class to include `fk-` prefix
### 2. `FK-Button` ❌
**Issue:** Incorrect case (uppercase)
**Reason:** FlowKit uses lowercase only
**Suggested:** `fk-button`
**Fix:** Convert to lowercase: `fk-button`
### 3. `fk_hero_title` ❌
**Issue:** Wrong separator (underscore)
**Reason:** FlowKit uses hyphens, not underscores
**Suggested:** `fk-hero-title`
**Fix:** Replace underscores with hyphens
### 4. `cardTitle` ❌
**Issue:** Multiple violations
- Missing `fk-` prefix
- CamelCase instead of kebab-case
**Reason:** FlowKit requires `fk-` prefix and hyphen separation
**Suggested:** `fk-card-title`
**Fix:** Add prefix and convert to kebab-case
---
## FlowKit Naming Rules:
✅ **Correct patterns:**
- `fk-card` (component)
- `fk-card-title` (element)
- `fk-button.is-primary` (with modifier)
- `fk-text-xl` (utility)
❌ **Incorrect patterns:**
- `card` (no prefix)
- `FK-Card` (wrong case)
- `fk_card` (wrong separator)
- `cardTitle` (camelCase)
Would you like me to rename these classes in Webflow Designer? (yes/no)
User prompt:
Create a product card component with FlowKit classes
Response:
🎨 FlowKit Product Card Component
Structure:
fk-card (base component)
├── fk-card-image-wrapper
│ └── fk-card-image + fk-rounded-lg
├── fk-card-badge + fk-text-xs + fk-text-uppercase + fk-bg-accent
├── fk-card-content + fk-space-md
│ ├── fk-card-category + fk-text-sm + fk-text-muted
│ ├── fk-card-title + fk-text-lg + fk-text-bold
│ ├── fk-card-description + fk-text-md
│ └── fk-card-price + fk-text-xl + fk-text-bold + fk-text-primary
└── fk-card-footer + fk-flex + fk-flex-between + fk-pt-md + fk-border-top
├── fk-card-rating + fk-flex + fk-space-xs
└── fk-button.is-primary + fk-text-sm
---
## Variants (Combo Classes):
### Featured Card
`fk-card.is-featured`
- Highlighted border/shadow
- Accent background
- Use for promoted products
### Horizontal Layout
`fk-card.is-horizontal`
- Side-by-side image/content
- Better for list views
- Image on left, content on right
### Compact Size
`fk-card.is-compact`
- Reduced padding
- Smaller text sizes
- Use in tight layouts
---
## Responsive Modifiers:
Desktop (default):
- `fk-grid-3` (3 cards per row)
Tablet:
- Add combo: `fk-grid-3.tablet-2`
Mobile:
- Add combo: `fk-grid-3.tablet-2.mobile-1`
---
Ready to create these classes? (yes/no)
User prompt:
Refactor my navigation to use FlowKit naming
Step 1: Current Analysis
🔍 Analyzing Current Navigation Classes...
Found 8 elements with non-FlowKit classes:
├── navbar → fk-nav
├── navbar-container → fk-nav-container
├── logo-wrapper → fk-nav-logo
├── menu → fk-nav-menu
├── menu-item → fk-nav-link
├── menu-item active → fk-nav-link.is-active
├── button-group → fk-nav-actions
└── btn-primary → fk-button.is-primary
---
## Migration Plan:
**Phase 1: Create FlowKit Classes** (8 classes)
- Create all `fk-nav-*` classes
- Create utility classes: `fk-flex`, `fk-flex-between`, `fk-flex-center`
- Create `fk-button` with `is-primary` modifier
**Phase 2: Update Elements** (8 elements)
- Replace old classes with new FlowKit classes
- Apply combo classes where needed
- Preserve existing styles
**Phase 3: Cleanup** (optional)
- Old classes can be removed after verification
- Keep for now to maintain backwards compatibility
---
Proceed with migration? (yes/no)
Step 2: After Migration
✅ Navigation Refactored to FlowKit
**Classes Created:** 8
**Elements Updated:** 8
**Time elapsed:** ~3 seconds
---
## Updated Structure:
fk-nav
├── fk-nav-container + fk-flex + fk-flex-between
│ ├── fk-nav-logo
│ ├── fk-nav-menu + fk-flex + fk-flex-center + fk-space-md
│ │ ├── fk-nav-link (x5)
│ │ └── fk-nav-link.is-active (current page)
│ └── fk-nav-actions + fk-flex + fk-space-sm
│ ├── fk-button.is-secondary
│ └── fk-button.is-primary
---
## Before → After:
| Old Class | New FlowKit Class |
|-----------|-------------------|
| navbar | fk-nav ✅ |
| navbar-container | fk-nav-container ✅ |
| logo-wrapper | fk-nav-logo ✅ |
| menu | fk-nav-menu ✅ |
| menu-item | fk-nav-link ✅ |
| menu-item active | fk-nav-link.is-active ✅ |
| button-group | fk-nav-actions ✅ |
| btn-primary | fk-button.is-primary ✅ |
---
🎉 Navigation is now FlowKit compliant!
**Next steps:**
- Test navigation on all breakpoints
- Verify active states work correctly
- Consider adding `fk-nav.is-transparent` for transparent header variant
- Consider adding `fk-nav.is-sticky` for sticky navigation
FlowKit Prefix Rule:
fk-is- prefix (as combo classes)Case Sensitivity:
Separator Rule:
-) to separate words_)Naming Structure:
Component: fk-[component]
Element: fk-[component]-[element]
Sub-element: fk-[component]-[element]-[detail]
Utility: fk-[property]-[value]
State modifier: is-[state] (combo class only)
Responsive: .[breakpoint]-[value] (combo class)
Component Names:
card, nav, hero, footerfk-card over fk-product-feature-cardfk-card.is-featured not fk-card-featuredElement Hierarchy:
fk-cardfk-card-[element] (e.g., fk-card-title)fk-card-content-section-text-wrapperfk-card-content, fk-card-textCommon Component Patterns:
Cards:
fk-card
├── fk-card-image
├── fk-card-content
│ ├── fk-card-title
│ └── fk-card-text
└── fk-card-footer
Navigation:
fk-nav
├── fk-nav-logo
├── fk-nav-menu
│ └── fk-nav-link
└── fk-nav-actions
Hero:
fk-hero
├── fk-hero-content
│ ├── fk-hero-title
│ ├── fk-hero-subtitle
│ └── fk-hero-actions
└── fk-hero-media
Forms:
fk-form
├── fk-form-group
│ ├── fk-form-label
│ └── fk-form-input
└── fk-form-actions
Utility Naming:
fk-[property]-[value]fk-text-lg, fk-space-md, fk-grid-3Spacing Utilities:
xs, sm, md, lg, xl, 2xl, 3xlpy (vertical), px (horizontal), pt (top), pr (right), pb (bottom), (left)Typography Utilities:
fk-text-[xs|sm|md|lg|xl|2xl|3xl]fk-text-[light|medium|semibold|bold]fk-text-[left|center|right]fk-text-[uppercase|lowercase|capitalize]Layout Utilities:
fk-flex, fk-flex-col, fk-flex-center, fk-flex-betweenfk-grid, fk-grid-2, fk-grid-3, fk-grid-4, fk-grid-6fk-container, fk-sectionState Modifier Rules:
is- prefix<div class="fk-button is-primary">...</div>Common States:
is-active Currently active/selected
is-disabled Disabled interaction
is-hidden Hidden visibility
is-visible Visible (override hidden)
is-loading Loading state
is-error Error state
is-success Success state
is-primary Primary variant
is-secondary Secondary variant
is-tertiary Tertiary variant
is-featured Featured/highlighted
is-horizontal Horizontal layout
is-vertical Vertical layout
is-expanded Expanded state (accordions, dropdowns)
is-collapsed Collapsed state
Applying Combo Classes in Webflow:
fk-buttonis-primaryfk-button is-primary.fk-button.is-primary { ... }Responsive Modifiers:
.[breakpoint]-[value]fk-grid-4.tablet-2.mobile-1Breakpoints:
Desktop (default): No modifier needed
Tablet: .tablet-[value]
Mobile: .mobile-[value]
Responsive Grid Example:
Base: fk-grid-4 (4 columns on desktop)
+ Combo: .tablet-2 (2 columns on tablet)
+ Combo: .mobile-1 (1 column on mobile)
Result: <div class="fk-grid-4 tablet-2 mobile-1">
Responsive Text Example:
Base: fk-text-3xl (48px on desktop)
+ Combo: .tablet-2xl (32px on tablet)
+ Combo: .mobile-xl (24px on mobile)
Result: <div class="fk-text-3xl tablet-2xl mobile-xl">
Always:
fk- prefix for all components and elementsfk-flex fk-flex-center fk-space-md)Never:
fk- prefix from componentsComponent vs Utility:
Use components when:
fk-card, fk-nav, fk-heroUse utilities when:
fk-text-lg, fk-space-md, fk-flex-centerUtility Stacking: Utilities can be freely combined:
<div class="fk-flex fk-flex-center fk-space-md fk-py-lg">
Content
</div>
Component + Utility Combo:
<div class="fk-card fk-shadow-lg fk-rounded-lg">
<div class="fk-card-content fk-space-lg">
<h3 class="fk-card-title fk-text-xl fk-text-bold">Title</h3>
</div>
</div>
Mistake 1: Missing Prefix
❌ card, button, nav
✅ fk-card, fk-button, fk-nav
Mistake 2: Wrong Case
❌ FK-Card, fk-Button, Fk-nav
✅ fk-card, fk-button, fk-nav
Mistake 3: Wrong Separator
❌ fk_card_title, fk.card.title
✅ fk-card-title
Mistake 4: camelCase/PascalCase
❌ fkCardTitle, FkCardTitle
✅ fk-card-title
Mistake 5: Modifier as Standalone Class
❌ <div class="fk-button-primary">
✅ <div class="fk-button is-primary">
Mistake 6: Too Much Nesting
❌ fk-hero-content-wrapper-section-title-text
✅ fk-hero-content, fk-hero-title
Mistake 7: Overly Specific Names
❌ fk-product-feature-card-with-image-and-price
✅ fk-card (use combo: is-product)
Mistake 8: Wrong Responsive Pattern
❌ fk-grid-3-tablet-2 (single class)
✅ fk-grid-3 tablet-2 (two classes)
FlowKit v2 (Current):
Key v2 Changes:
fk- prefix across all componentsis- prefix for state modifiers (combo classes).tablet-, .mobile-)Migration from v1: If user has v1 FlowKit classes:
fk- prefix where missingis- combo classesClass Creation:
style_tool in batches of 10-15 classesElement Updates:
Designer Connection:
Common Errors:
1. Designer Not Connected:
❌ Error: Cannot create classes - Designer not connected
Solution:
1. Open Webflow Designer
2. Open the target site
3. Connect to Designer in Claude Code
4. Retry operation
2. Class Already Exists:
⚠️ Warning: Class 'fk-button' already exists
Options:
1. Skip creation (use existing)
2. Update existing class
3. Create with different name
3. Invalid Class Name:
❌ Error: Class name 'fk-My Button' is invalid
Issues:
- Contains spaces
- Contains uppercase
Suggested: 'fk-my-button'
4. Style Property Not Supported:
⚠️ Warning: Property 'custom-property' not supported
This may be:
- Custom CSS property
- Webflow doesn't support via Designer API
- Typo in property name
Recommendation: Apply manually in Designer
Case 1: Third-Party Integration Classes If integrating with third-party libraries (e.g., animations, sliders):
<div class="fk-slider"><div class="swiper">...</div></div>Case 2: Legacy Code Migration When migrating large existing site:
Case 3: Custom Naming Requirements If client has existing naming system:
Case 4: Component Library Conflicts If site uses another framework (Bootstrap, Tailwind):
Case 5: Utility Class Explosion If too many utility classes on single element:
fk-flex fk-flex-center fk-space-md fk-py-lg fk-px-xl fk-rounded-lg fk-shadowfk-panel with those properties built-inBefore considering FlowKit implementation complete:
Setup:
Component Structure:
fk- prefixis- prefixUtilities:
Responsive:
States:
Documentation:
Validation:
Performance:
User Experience:
Weekly Installs
90
Repository
GitHub Stars
36
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode78
codex77
cursor77
gemini-cli75
github-copilot69
claude-code67
Android 整洁架构指南:模块化设计、依赖注入与数据层实现
1,300 周安装
| Combo class modifier (state/variant) |
fk-card.is-featured |
fk-text-[style] | Typography utility | fk-text-xl, fk-text-bold |
fk-flex / fk-grid | Layout utilities | fk-flex-center, fk-grid-3 |
fk-space-[size] | Spacing utilities | fk-space-md, fk-py-lg |
is-[state] | State modifiers (combo) | is-active, is-hidden, is-disabled |
plmy, mx, mt, mr, mb, ml