Design a layered grid architecture.
Component tree:
Spreadsheet
├── Toolbar (formatting, functions)
├── FormulaBar
├── Grid
│ ├── ColumnHeaders
│ ├── RowHeaders
│ └── CellContainer
│ └── Cell (virtualized)
├── SelectionOverlay
└── ContextMenu
Separation of concerns:
- Grid handles rendering and virtualization
- SelectionOverlay draws selection independently
- Cell is a simple display component
- Editing happens in a floating input