Add User Guide section with 11 articles derived from OpenSpec specs
New docs/user-guide/ section covering: canvas navigation, selection &
manipulation, drawing shapes, text editing, pen tool, layers & pages,
context menu, exporting, auto-layout, components, and variables.
Each article includes Mac+Win/Linux shortcuts tables, cross-platform
note, cross-links between related articles, and consistent structure.
VitePress sidebar updated with User Guide as first group (12 entries).
2026-03-01 10:02:47 +00:00
---
title: Components
description: Creating reusable components, instances, component sets, overrides, and live sync in OpenPencil.
---
# Components
Components are reusable design elements. Edit the main component and all its instances update automatically.
## Creating a Component
Remove implementation details from user guide
Replace internal references (Yoga, CanvasKit, Paragraph API, style runs,
characterStyleIDs, vectorNetworkBlob, Kiwi binary, scene graph, font-kit,
Local Font Access API, COMPONENT type, override key format, hex codes, px
specs) with user-facing language across all 7 locales.
2026-03-08 09:55:25 +00:00
Select a frame or group and press < kbd > ⌥< / kbd > < kbd > ⌘< / kbd > < kbd > K< / kbd > (< kbd > Ctrl< / kbd > + < kbd > Alt< / kbd > + < kbd > K< / kbd > ). The selection becomes a reusable component.
Add User Guide section with 11 articles derived from OpenSpec specs
New docs/user-guide/ section covering: canvas navigation, selection &
manipulation, drawing shapes, text editing, pen tool, layers & pages,
context menu, exporting, auto-layout, components, and variables.
Each article includes Mac+Win/Linux shortcuts tables, cross-platform
note, cross-links between related articles, and consistent structure.
VitePress sidebar updated with User Guide as first group (12 entries).
2026-03-01 10:02:47 +00:00
If you select multiple nodes, they're wrapped in a new component positioned at their bounding box.
Components display a purple label with a diamond icon above them.
## Component Sets
Use <kbd> for keyboard shortcuts across all docs
Wrap all keyboard shortcut references in <kbd> tags in user guide,
reference, and development docs across all 7 locales (en, de, es,
fr, it, pl, ru). Tables, inline prose, and parenthetical hints.
2026-03-08 09:48:02 +00:00
Select two or more components and press < kbd > ⇧< / kbd > < kbd > ⌘< / kbd > < kbd > K< / kbd > (< kbd > Shift< / kbd > + < kbd > Ctrl< / kbd > + < kbd > K< / kbd > ) to combine them into a component set — a container with a dashed purple border and 40 px padding around its children. Component sets are useful for grouping variants (e.g., button states).
Add User Guide section with 11 articles derived from OpenSpec specs
New docs/user-guide/ section covering: canvas navigation, selection &
manipulation, drawing shapes, text editing, pen tool, layers & pages,
context menu, exporting, auto-layout, components, and variables.
Each article includes Mac+Win/Linux shortcuts tables, cross-platform
note, cross-links between related articles, and consistent structure.
VitePress sidebar updated with User Guide as first group (12 entries).
2026-03-01 10:02:47 +00:00
## Creating Instances
Right-click a component and select **Create instance** from the context menu. The instance appears 40 px to the right of the source component, visually identical.
Instance creation is available only through the context menu — there's no toolbar button.
## Detaching an Instance
Use <kbd> for keyboard shortcuts across all docs
Wrap all keyboard shortcut references in <kbd> tags in user guide,
reference, and development docs across all 7 locales (en, de, es,
fr, it, pl, ru). Tables, inline prose, and parenthetical hints.
2026-03-08 09:48:02 +00:00
Select an instance and press < kbd > ⌥< / kbd > < kbd > ⌘< / kbd > < kbd > B< / kbd > (< kbd > Ctrl< / kbd > + < kbd > Alt< / kbd > + < kbd > B< / kbd > ) to detach it. The instance becomes a regular frame with no link to the original component. All overrides are baked in.
Add User Guide section with 11 articles derived from OpenSpec specs
New docs/user-guide/ section covering: canvas navigation, selection &
manipulation, drawing shapes, text editing, pen tool, layers & pages,
context menu, exporting, auto-layout, components, and variables.
Each article includes Mac+Win/Linux shortcuts tables, cross-platform
note, cross-links between related articles, and consistent structure.
VitePress sidebar updated with User Guide as first group (12 entries).
2026-03-01 10:02:47 +00:00
## Go to Main Component
Right-click an instance and select **Go to main component** . The editor navigates to and selects the main component, switching pages if needed.
## Live Sync
When you edit a component, all its instances update automatically. Synced properties include:
- Width and height
- Fills, strokes, and effects
- Opacity and corner radii
- Layout properties (auto layout settings)
- Clips content setting
Sync triggers automatically after node updates, moves, and resizes within a component.
## Overrides
Instances can override specific properties without breaking the sync link. When a property is overridden on an instance, that property is skipped during sync — other properties continue to update from the main component.
### Overridable Properties
Remove implementation details from user guide
Replace internal references (Yoga, CanvasKit, Paragraph API, style runs,
characterStyleIDs, vectorNetworkBlob, Kiwi binary, scene graph, font-kit,
Local Font Access API, COMPONENT type, override key format, hex codes, px
specs) with user-facing language across all 7 locales.
2026-03-08 09:55:25 +00:00
Child-level overrides support: name, text, font size, font weight, font family, plus all visual and layout properties (fills, strokes, effects, opacity, corner radii, size).
Add User Guide section with 11 articles derived from OpenSpec specs
New docs/user-guide/ section covering: canvas navigation, selection &
manipulation, drawing shapes, text editing, pen tool, layers & pages,
context menu, exporting, auto-layout, components, and variables.
Each article includes Mac+Win/Linux shortcuts tables, cross-platform
note, cross-links between related articles, and consistent structure.
VitePress sidebar updated with User Guide as first group (12 entries).
2026-03-01 10:02:47 +00:00
### New Children
When you add a child to a component, all existing instances gain a cloned copy automatically. Child order in instances always matches the component.
## Hit Testing
Components and instances are opaque containers — clicking on a child selects the component itself, not the child. **Double-click** to enter the component and select children inside it.
## Visual Treatment
| Element | Appearance |
|---------|------------|
Remove implementation details from user guide
Replace internal references (Yoga, CanvasKit, Paragraph API, style runs,
characterStyleIDs, vectorNetworkBlob, Kiwi binary, scene graph, font-kit,
Local Font Access API, COMPONENT type, override key format, hex codes, px
specs) with user-facing language across all 7 locales.
2026-03-08 09:55:25 +00:00
| Component label | Purple with diamond icon, always visible |
| Instance label | Purple with diamond icon, always visible |
| Component set border | Dashed purple outline |
Add User Guide section with 11 articles derived from OpenSpec specs
New docs/user-guide/ section covering: canvas navigation, selection &
manipulation, drawing shapes, text editing, pen tool, layers & pages,
context menu, exporting, auto-layout, components, and variables.
Each article includes Mac+Win/Linux shortcuts tables, cross-platform
note, cross-links between related articles, and consistent structure.
VitePress sidebar updated with User Guide as first group (12 entries).
2026-03-01 10:02:47 +00:00
## Keyboard Shortcuts
| Action | Mac | Windows / Linux |
|--------|-----|-----------------|
Use <kbd> for keyboard shortcuts across all docs
Wrap all keyboard shortcut references in <kbd> tags in user guide,
reference, and development docs across all 7 locales (en, de, es,
fr, it, pl, ru). Tables, inline prose, and parenthetical hints.
2026-03-08 09:48:02 +00:00
| Create component | < kbd > ⌥< / kbd > < kbd > ⌘< / kbd > < kbd > K< / kbd > | < kbd > Ctrl< / kbd > + < kbd > Alt< / kbd > + < kbd > K< / kbd > |
| Create component set | < kbd > ⇧< / kbd > < kbd > ⌘< / kbd > < kbd > K< / kbd > | < kbd > Shift< / kbd > + < kbd > Ctrl< / kbd > + < kbd > K< / kbd > |
| Detach instance | < kbd > ⌥< / kbd > < kbd > ⌘< / kbd > < kbd > B< / kbd > | < kbd > Ctrl< / kbd > + < kbd > Alt< / kbd > + < kbd > B< / kbd > |
Add User Guide section with 11 articles derived from OpenSpec specs
New docs/user-guide/ section covering: canvas navigation, selection &
manipulation, drawing shapes, text editing, pen tool, layers & pages,
context menu, exporting, auto-layout, components, and variables.
Each article includes Mac+Win/Linux shortcuts tables, cross-platform
note, cross-links between related articles, and consistent structure.
VitePress sidebar updated with User Guide as first group (12 entries).
2026-03-01 10:02:47 +00:00
## Tips
- Editing text inside an instance creates an override — the text won't be overwritten when the component changes.
- Use component sets to organize variants (e.g., Primary/Secondary/Disabled button states).
- Double-click into a component before editing its children — single click selects the component container.
- See [Context Menu ](./context-menu ) for all component-related actions.