Skip to main content

Installation

Purpose​

Set up widgemo-core and required peer dependencies so your first Widgemo can render correctly.

Prerequisites​

  • Node.js 18 or newer
  • A React project (Vite, Next.js, CRA, or custom bundler)

Install​

npm install @widgemo/widgemo-core

Peer Dependencies​

widgemo-core requires React and React-DOM as peer dependencies. If they are not already in your project:

npm install react react-dom

Peer dependency version range:

{
"peerDependencies": {
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
}
}

TypeScript​

widgemo-core ships with built-in .d.ts type definitions. No separate @types/ package is needed.

Framework compatibility​

Works with any React setup — Next.js, Vite, Create React App, or custom bundlers. No special adapter is required.

Stylesheet​

Import the default stylesheet once at your app root (or layout):

import '@widgemo/widgemo-core/style.css';

Common Install Issues​

  • Peer dependency warning for React: install matching react and react-dom versions in your app.
  • Invalid hook call at runtime: ensure there is only one React instance in the app (common in monorepos and linked local packages).
  • Styles not applied: verify @widgemo/widgemo-core/style.css is imported in a global entry point (app/layout.tsx, pages/_app.tsx, or main app entry).

Next Steps​

Follow the standard Getting Started path:

  1. Quick Start
  2. Your First Widgemo
  3. Common Setup Pitfalls