Installation
Install the package with your preferred package manager:
npm install imperative-surfacepnpm add imperative-surfaceyarn add imperative-surfacebun add imperative-surfacePeer dependencies
The package expects:
{
"react": ">=18.0.0",
"react-dom": ">=18.0.0"
}If your application already uses React 18 or newer, no additional React package is required.
Import
The primary API is exported from the package root:
import { Surface } from 'imperative-surface';The package also exports the public TypeScript types:
import type {
SheetArgs,
DialogArgs,
SurfaceContext,
} from 'imperative-surface';CSS
The library injects its bundled CSS when the package is imported, so there is no separate stylesheet import required in a normal application setup.