11. Components and instances
Esta página está em inglês; a tradução está a caminho.
| ID | Requirement | P | Type | Ver. | M |
|---|---|---|---|---|---|
| CMP-1 | Any selection shall become a component. Ctrl+Alt+K; several selected nodes become several components or one component set (“Create multiple components” / “Combine as variants”). | Must | functional | test | 0.4 |
| CMP-2 | Instances shall follow their main component. Changes to the main component propagate to every instance in the file immediately, except overridden properties. | Must | functional | test | 0.4 |
| CMP-3 | Instances shall accept overrides. Fills, strokes, effects, text content and style, visibility, nested instance swaps, layout sizing within allowed properties; “Reset all overrides” and per-property reset; “Push changes to main component”. | Must | functional | test | 0.4 |
| CMP-4 | Component sets shall have variants. Variant properties with values (e.g. `Size=sm | md | lg, State=Default |
Hover | Disabled`); the instance panel shows a picker per property; switching variant keeps compatible overrides. |
| CMP-5 | Components shall have component properties. Boolean (show/hide a layer), Text (bind a text layer’s content), Instance swap (a nested instance with preferred values), each with a default and a description. Should: Slot (a SLOT node that accepts arbitrary children in an instance, DOC-2). |
Must | functional | test | 0.4 |
| CMP-6 | Instances shall be detachable and swappable. Detach (Ctrl+Alt+B) turns an instance into frames; swap instance keeps overrides where names match; “Go to main component”. | Must | functional | test | 0.4 |
| CMP-7 | An Assets panel shall list components. By page and section, searchable, with thumbnails, drag to insert, descriptions and documentation links. | Must | functional | test | 0.4 |
| CMP-8 | Interactive components shall carry prototype behaviour. Interactions between variants (hover, press, toggle) that every instance plays in prototypes. | Should | functional | test | 0.5 |
| CMP-9 | Components shall have usage reports. Number of instances per file in the workspace, detached copies, and the overrides most used. Also ud components usage. |
Should | functional | test | 0.6 |