Installation
Install the Birch UI packages for each product and framework, and choose between auto-injected styles and a CSS import.
All Birch UI packages are published to npm under the @birchui scope. They are ESM only, ship their own TypeScript types and have no runtime dependencies apart from each other (and @noble/ed25519 inside the license package).
Pick your packages#
Install the engine for the product you use, plus the adapter for your framework. Plain JavaScript and TypeScript apps need only the engine.
Birch UI Grid (free)#
npm install @birchui/corepnpm add @birchui/coreyarn add @birchui/coreGrid Pro#
Grid Pro builds on the free grid. The Excel Engine and the license package are installed with it as dependencies, so you do not list them yourself.
npm install @birchui/core @birchui/grid-propnpm add @birchui/core @birchui/grid-proyarn add @birchui/core @birchui/grid-proPivot Studio#
Pivot Studio renders its pivot table with Birch UI Grid and exports through the Excel Engine; both are installed with it. Add @birchui/charts only if you use pivot charts from the @birchui/pivot-studio/charts entry point.
npm install @birchui/core @birchui/pivot-studiopnpm add @birchui/core @birchui/pivot-studioyarn add @birchui/core @birchui/pivot-studioExcel Engine on its own#
Use the Excel Engine without a grid to generate or read .xlsx files in the browser, in a worker or in Node.
npm install @birchui/excelpnpm add @birchui/excelyarn add @birchui/excelScheduler#
npm install @birchui/core @birchui/schedulerpnpm add @birchui/core @birchui/scheduleryarn add @birchui/core @birchui/schedulerGantt#
The Gantt shares its time axis with the Scheduler package, which is installed with it as a dependency. Its task grid is the free Birch UI Grid, and neither a Scheduler nor a Grid Pro license is needed.
npm install @birchui/ganttpnpm add @birchui/ganttyarn add @birchui/ganttEvent Calendar#
npm install @birchui/calendarpnpm add @birchui/calendaryarn add @birchui/calendarCharts#
npm install @birchui/core @birchui/chartspnpm add @birchui/core @birchui/chartsyarn add @birchui/core @birchui/chartsDiagram#
npm install @birchui/core @birchui/diagrampnpm add @birchui/core @birchui/diagramyarn add @birchui/core @birchui/diagramSpreadsheet#
The Spreadsheet reads and writes .xlsx files through the Excel Engine, which is installed with it as a dependency.
npm install @birchui/core @birchui/spreadsheetpnpm add @birchui/core @birchui/spreadsheetyarn add @birchui/core @birchui/spreadsheetForms and the Form Builder#
The free renderer and the paid Form Builder ship in one package. Import the renderer from @birchui/forms and the builder from @birchui/forms/builder.
npm install @birchui/formspnpm add @birchui/formsyarn add @birchui/formsFramework adapters#
Each adapter wraps every product. The grid component comes from the main entry point; the scheduler component comes from the /scheduler subpath, so grid-only apps never load scheduler code.
| Framework | Package | Peer dependency | Grid import | Scheduler import |
|---|---|---|---|---|
| React | @birchui/react |
react and react-dom 18 or later |
BirchGrid from @birchui/react |
BirchScheduler from @birchui/react/scheduler |
| Vue | @birchui/vue |
vue 3.3 or later |
BirchGrid from @birchui/vue |
BirchScheduler from @birchui/vue/scheduler |
| Angular | @birchui/angular |
@angular/core 17.3 or later |
BirchGridComponent from @birchui/angular |
BirchSchedulerComponent from @birchui/angular/scheduler |
| Svelte | @birchui/svelte |
svelte 5 or later |
BirchGrid and the birchGrid action from @birchui/svelte |
BirchScheduler from @birchui/svelte/scheduler |
| Solid | @birchui/solid |
solid-js 1.8 or later |
BirchGrid from @birchui/solid |
BirchScheduler from @birchui/solid/scheduler |
| Web Component | @birchui/element |
none | defineBirchGrid() from @birchui/element |
defineBirchScheduler() from @birchui/element/scheduler |
For example, a React app that uses Grid Pro:
npm install @birchui/core @birchui/grid-pro @birchui/react@birchui/scheduler is an optional peer dependency of every adapter. Install it only when you use the scheduler component.
The Svelte components ship as .svelte source and are resolved through the svelte export condition, which Vite and SvelteKit use by default.
The adapters have no entry points for Pivot Studio, Gantt, the Event Calendar, Charts, Diagram, Spreadsheet or Forms. Use createPivotStudio, createGantt, createCalendar, createChart, createDiagram, createSpreadsheet, createForm and createFormBuilder directly, or wrap pivotStudioDefinition, ganttDefinition, calendarDefinition, chartDefinition, diagramDefinition, spreadsheetDefinition, formDefinition or formBuilderDefinition with your adapter's factory (createReactComponent, createVueComponent, createSolidComponent, createSvelteAction or createElementRegistration). Each framework guide shows how. See the Pivot Studio, Gantt, Event Calendar, Charts, Diagram, Spreadsheet and Forms overviews.
Styles#
Every widget needs its stylesheet. You can let Birch UI inject it, or import the CSS file yourself.
Auto-injected styles (default)#
When you create a grid or scheduler, Birch UI adds a single <style> element to the document head with the widget's CSS. It is added once per page, no matter how many widgets you create. There is nothing to configure.
Importing the CSS file#
If your bundler already handles CSS, or your Content Security Policy does not allow inline styles, import the stylesheet and turn injection off:
import '@birchui/core/styles.css';
import '@birchui/grid-pro/styles.css';
import { createGrid } from '@birchui/core';
const grid = createGrid(document.querySelector('#orders')!, {
columns: [{ field: 'customer', header: 'Customer' }],
injectStyles: false,
});The packages that ship a stylesheet are @birchui/core, @birchui/grid-pro, @birchui/scheduler, @birchui/pivot-studio, @birchui/gantt, @birchui/calendar, @birchui/charts, @birchui/diagram, @birchui/spreadsheet and @birchui/forms, each at <package>/styles.css. Every widget accepts injectStyles: false.
Requirements#
- Browsers: current versions of Chrome, Edge, Firefox and Safari. Birch UI uses
ResizeObserver, CSS custom properties andposition: sticky. - Bundlers: any ESM-aware bundler, such as Vite, webpack 5, Rollup, esbuild, Next.js, Nuxt, the Angular CLI or SvelteKit. There is no CommonJS build.
- TypeScript: types are included. Use
"moduleResolution": "bundler"or"node16"so theexportsmap and the/schedulersubpaths resolve. - Server rendering: importing any package is safe on the server. Create widgets only in the browser; each framework guide shows where.
Adding a license key#
Paid packages work without a key. Grid Pro, Pivot Studio, the scheduler, the Gantt, the event calendar, Charts, Diagram, the Spreadsheet and the Form Builder show a watermark on non-local hosts, and the Excel Engine logs a console warning. The form renderer is MIT and never checks a key. When you have bought a license, set the key once at startup:
import { setLicenseKey } from '@birchui/license';
setLicenseKey(import.meta.env.VITE_BIRCHUI_LICENSE_KEY);In a web worker that runs the Excel Engine, set the key inside the worker as well, or pass { licenseKey } to writeXlsx and readXlsx. See Licensing and activation for every option.
Next steps#
- Build your first grid with the Quick start.
- Read the guide for your framework: React, Vue, Angular, Svelte, Solid or Web Component.