|
| 1 | +--- |
| 2 | +name: openclaw-design-system |
| 3 | +description: Build or modify OpenClaw application UI using canonical semantic tokens, themes, shared CSS foundations, consumer adapters, and established local primitives. Use for product interfaces, component styling, theme work, or design-token integration. |
| 4 | +--- |
| 5 | + |
| 6 | +# OpenClaw Design System |
| 7 | + |
| 8 | +Use the shared package for foundations and framework-neutral visual primitives. |
| 9 | +Keep consumer-specific behavior, data, routes, and layout composition local. |
| 10 | + |
| 11 | +## Workflow |
| 12 | + |
| 13 | +1. Read [tokens.md](references/tokens.md) before choosing colors, spacing, type, radii, or shadows. |
| 14 | +2. Read [consumer-adapters.md](references/consumer-adapters.md) for the current framework. |
| 15 | +3. Inspect the consumer's existing shared primitives before creating a component. |
| 16 | +4. Use semantic tokens for UI intent; use palette primitives only for documented exceptions. |
| 17 | +5. Keep application behavior, routes, and information architecture unchanged unless the task says otherwise. |
| 18 | +6. Validate the affected routes with existing tests and real browser screenshots. |
| 19 | + |
| 20 | +## Interface Rules |
| 21 | + |
| 22 | +- Import the complete CSS contract or its focused exported entry points. |
| 23 | +- Compose shared classes from `components.css` before adding a one-off visual implementation. |
| 24 | +- Use local shared primitives before raw controls or one-off component implementations. |
| 25 | +- Keep one primary action per decision area. |
| 26 | +- Use familiar icons for icon-only commands and provide accessible names. |
| 27 | +- Use status colors for status, warning, success, error, and informational meaning. |
| 28 | +- Keep cards, controls, and repeated fixed-format elements dimensionally stable. |
| 29 | +- Avoid nested decorative cards and page sections styled as floating cards. |
| 30 | +- Keep surfaces, controls, and insets square through their semantic radius tokens. |
| 31 | +- Reserve round geometry for avatars, status dots, and other truly circular indicators. |
| 32 | +- Keep focus, hover, active, disabled, loading, and invalid states coherent. |
| 33 | +- Keep text within its container at supported viewport sizes. |
| 34 | +- Prefer dense, scan-friendly composition for operational product surfaces. |
| 35 | + |
| 36 | +## Ownership |
| 37 | + |
| 38 | +Move visual implementation into this repository when its interface is |
| 39 | +framework-neutral and useful across consumers. Keep runtime behavior and |
| 40 | +framework adapters local until at least two consumers need the same interface |
| 41 | +and behavior. |
0 commit comments