Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,19 @@ npm install monorailphp

### Peer dependencies

Starting with `0.2.0`, Monorail's UI libraries (radix-ui, recharts, sonner,
react-day-picker, cmdk, date-fns, lucide-react, class-variance-authority,
clsx, tailwind-merge) are declared as `peerDependencies` so the host app's
versions stay authoritative and React is never duplicated.

- **npm 7+** installs them automatically alongside `monorailphp`.
- **pnpm / yarn with strict peer resolution** require an explicit install:

```bash
npm install radix-ui recharts sonner react-day-picker cmdk date-fns \
lucide-react class-variance-authority clsx tailwind-merge
```
Monorail ships its UI libraries (`radix-ui`, `recharts`, `sonner`,
`react-day-picker`, `cmdk`, `date-fns`, `lucide-react`,
`class-variance-authority`, `clsx`, `tailwind-merge`) as regular
`dependencies` so `npm install monorailphp` pulls them in automatically.

Only React itself and Inertia remain as peers — these must be deduplicated
with the host app so hooks and the Inertia router stay in a single instance:

- `react ^18 || ^19`
- `react-dom ^18 || ^19`
- `@inertiajs/react ^3.0.0`

A standard Laravel + Inertia React app already satisfies these.

## Manual install

Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,21 @@
},
"peerDependencies": {
"@inertiajs/react": "^3.0.0",
"react": "^18 || ^19",
"react-dom": "^18 || ^19"
},
"dependencies": {
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"date-fns": "^4.1.0",
"lucide-react": "^0.475.0",
"radix-ui": "^1.4.3",
"react": "^18 || ^19",
"react-day-picker": "^9.4.3 || ^10.0.0",
"react-dom": "^18 || ^19",
"recharts": "^3.8.1",
"sonner": "^2.0.7",
"tailwind-merge": "^3.0.1"
},
"dependencies": {
"monorailphp": "^0.1.2"
},
"devDependencies": {
"shadcn": "^4.3.0"
},
Expand Down
Loading