## Mini Sheet (S—376)

A tiny spreadsheet that really calculates: cell references, arithmetic, and SUM, AVG, MIN, MAX over ranges.

- URL: https://sundaeui.dev/components/mini-sheet
- Category: UI components · Art direction: Refined
- Access: Free (no account needed)
- Stack: React 18+, TypeScript, plain CSS; dependencies: none
- Install: `npx shadcn@latest add https://sundaeui.dev/r/mini-sheet.json`
- Tags: calculator, grid, formula, data, cells, spreadsheet

Select a cell to see its raw content in the formula bar; type a number, text or a formula starting with =. Dependent cells recalculate instantly.
Errors are shown in the cell as #REF, #ERR or #CYCLE rather than breaking the sheet. Arrow keys move the selection.

### Usage

```tsx
import { MiniSheet } from '@/components/sundae/mini-sheet'

<MiniSheet />
```

### Props

- `cells` (`Record<string, string>`, required): Starting cells by address, e.g. { A1: "12", B1: "=A1*2" }.
- `fill` (`'dark' | 'light'`, default `'dark'`): Surface: dark or light.

### When to use

- Embedded calculators, teaching formulas, quick budgets.

### When not to use

- Real spreadsheets with many rows.

### Accessibility

- The grid is a table with column and row headers; cells are buttons named by address and value.
- The formula bar is a labelled input.
- Reduced motion removes the movement and keeps every state change.
