Skip to main content

aidd-layout

Enforces UI component layout and composition patterns. Use when designing layouts, creating UI components, spacing, gaps, or when the user asks about component hierarchy, terminal vs layout components, or re-render efficiency.

来源信息

仓库
paralleldrive/riteway
最近来源活动
2026年3月17日 20:30
检测到的 SKILL.md 语言
英语
星标
1,196
分支
40

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
4 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
aidd-layout
description
Enforces UI component layout and composition patterns. Use when designing layouts, creating UI components, spacing, gaps, or when the user asks about component hierarchy, terminal vs layout components, or re-render efficiency.
# Layout and component types UI components are one of two types with no overlap. Every component is either terminal or layout. --- ## Terminal components ```sudolang TerminalComponent { renders: "own UI (buttons, inputs, cards, text, etc.)" contains: "CSS for appearance" never: "contain any external margin" role: "leaves of the component tree; own visual styling and content" } ``` --- ## Layout components ```sudolang LayoutComponent { doesNotRender: "any UI themselves" composedOf: "other layout or terminal components only" responsibleFor: "interior gaps between children" never: "contain any external margin" css: "Should not need CSS 90% of the time or more — use standard layout tokens" reRender: "Generally no business logic; should never re-render — keeps re-renders at terminal levels" exception: "Some layout components explicitly manage state (animating, tabs, accordions) — those have logic and may re-render" } ``` Should not need CSS 90% of the time or more — use the standard layout tokens. See [design-tokens](references/design-tokens.md). --- ## Why this split matters Layout components that rarely re-render are efficient. State changes and user interactions trigger updates at terminal levels; layout structure above stays stable. Avoid putting reactive logic in layout components unless the layout itself is dynamic (tabs, accordions, animations). --- ## Execute ```sudolang fn whenCreatingOrModifyingUIComponent() { Constraints { Classify as terminal or layout; no overlap Terminal: owns UI and CSS; never external margin Layout: no own UI; only layout/terminal children; owns interior gaps; never external margin Prefer standard layout tokens for layout components; avoid custom CSS when possible Keep layout components free of business logic unless they explicitly manage layout state (tabs, accordions, animations) } } ``` See [design-tokens](references/design-tokens.md) for token reference.
在 GitHub 查看