component-composition-patterns
仓库创建 2026年7月4日最近提交 22 天前SkillHot 收录 22 天前
▸ 精选理由
适合在组件库或多场景 UI 中统一实现复用与配置化行为。
这个 Skill 做什么
介绍通过通用基组件与具体包装器构建可复用组件的模式。
帮你把可复用的组件拆成通用的“底座”跟具体的包装器,底座负责功能和数据,包装器负责样式、配置和领域行为。适合需要同一份逻辑在不同场景下用不同主题或配置时使用,能避免重复造轮子。特别之处在于把 presentation 和 styling/theming 清晰分离,方便按环境组合或通过配置驱动行为。
▸ 展开 SKILL.md 英文原文
Building reusable components through composition using generic base components with specific wrapper components that provide styling, configuration, and domain-specific behavior.
0
Stars
0
Forks
23
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/ceilidhboy/skills/master/skills/component-composition-patterns/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/ceilidhboy/skills/master/skills/component-composition-patterns/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Component Composition Patterns ## When to Activate This Skill Activate this skill whenever you are: - Creating reusable components that will be used in multiple contexts with different styling - Building a generic base component and specific wrapper components around it - Implementing configuration-driven component behavior - Separating presentation logic from styling/theming logic - Creating components that follow the composition pattern (generic + wrappers) ## The Composition Pattern This pattern separates concerns into three layers: 1. **Generic Base Component** — Pure presentation, no styling decisions 2. **Wrapper Components** — Domain-specific styling and configuration 3. **Conf
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有