Skip to content

功能区 Features

Features 是一个综合性的功能展示组件,支持三个层级的内容:主功能大图展示、图片特性网格和其他特性列表。适合在产品页中全面展示产品能力。

核心能力

为什么选择我们
一站式解决方案

我们提供从内容创作到发布的完整工作流。

核心功能

极速响应

毫秒级的页面加载速度。

安全加固

企业级的安全防护体系。

全球分发

CDN 加速覆盖全球。

灵活配置

高度可定制的配置选项。

import { Features } from '@goenhance/cms-ui';
import { Zap, Shield, Globe } from 'lucide-react';
const Example = () => (
<Features
badge="产品特性"
title="强大功能"
subtitle="一站搞定"
description="全面的功能覆盖。"
mainFeature={{
badge: "核心亮点",
title: "可视化编辑器",
description: "拖拽即所得...",
text: "立即体验",
url: "/demo",
mediaUrl: "/feature-main.jpg",
alt: "编辑器截图"
}}
imageFeatures={{
title: "核心功能",
list: [
{ icon: Zap, title: "极速", description: "...", color: "text-yellow-500" }
]
}}
otherFeatures={{
title: "更多能力",
list: [
{ icon: Shield, title: "安全", description: "...", color: "text-green-500" }
]
}}
/>
);
属性类型默认值说明
badgestring-顶部徽章文字
titlestring-主标题
subtitlestring-渐变副标题
descriptionstring-描述文本
mainFeatureMainFeature-主功能展示(大图+文案)
imageFeatures{ title, list }-图标特性网格
otherFeatures{ title, list }-其他特性列表
sectionIdstring"features"section 元素的 id
属性类型说明
iconLucideIcon图标组件
titlestring特性标题
subtitlestring可选副标题
descriptionstring特性描述
colorstring图标颜色类
bgColorstring自定义图标背景类
属性类型说明
badgestring功能标签
titlestring功能标题
descriptionstring功能描述
textstring按钮文字
urlstring按钮链接
targetstring链接打开方式
mediaUrlstring展示图片 URL
altstring图片替代文本
posterstring视频封面
  • 三层结构:主功能大图 + 图标网格 + 其他列表,灵活组合。
  • 渐变副标题:subtitle 自动应用品牌渐变色。
  • 悬停动效:卡片悬停时上浮并增强阴影,图标缩放。

类名:mewx-cms-features

变量名用途默认值
--mewx-cms-features-bg背景色var(--blocks-bg-page)
--mewx-cms-features-badge-bg徽章背景var(--blocks-primary-lightest)
--mewx-cms-features-badge-border徽章边框var(--blocks-primary-lighter)
--mewx-cms-features-badge-text徽章文字色var(--blocks-primary)
--mewx-cms-features-heading-text标题文字色var(--blocks-text-heading)
--mewx-cms-features-muted-text描述文字色var(--blocks-text-muted)
--mewx-cms-features-gradient-text渐变副标题var(--blocks-gradient-text)
--mewx-cms-features-card-bg卡片背景var(--blocks-bg-card)
--mewx-cms-features-card-shadow卡片阴影var(--blocks-shadow-card)
--mewx-cms-features-card-hover-shadow卡片悬停阴影var(--blocks-shadow-card-hover)
--mewx-cms-features-card-radius卡片圆角var(--blocks-radius-2xl)
--mewx-cms-features-icon-bg图标背景var(--blocks-primary-lightest)
--mewx-cms-features-icon-radius图标圆角var(--blocks-radius-lg)
--mewx-cms-features-subtitle-text特性副标题色var(--blocks-primary)
/* 暗色功能区 */
.dark-features {
--mewx-cms-features-bg: 15 23 42;
--mewx-cms-features-heading-text: 255 255 255;
--mewx-cms-features-muted-text: 148 163 184;
--mewx-cms-features-card-bg: 30 41 59;
--mewx-cms-features-icon-bg: 51 65 85;
}
<Features className="dark-features" badge="核心能力" title="为什么选择我们" subtitle="解决方案" description="..." />