WHITEBOARD SAAS
WhiteboardShell
The pan/zoom canvas viewport. Fixed-position, full-viewport. Mount it once, drop FloatingPanels inside.
PREVIEW
SOURCE
'use client'
import '@objectifthunes/whiteboard/style.css'
import { WhiteboardShell, FloatingPanel } from '@objectifthunes/whiteboard'
export default function App() {
return (
<div style={{ position: 'relative', height: '100vh' }}>
<WhiteboardShell>
<FloatingPanel title="Settings" defaultPosition={{ x: 40, y: 40 }} focusable>
Drag · scroll to zoom · double-click to focus
</FloatingPanel>
</WhiteboardShell>
</div>
)
}SOURCE
interface Props {
children: ReactNode
showMinimap?: boolean // default true
minimapLoading?: boolean // default false
extraActions?: ReactNode // rendered inside the ZoomBar
}NOTES
WhiteboardShell is position: fixed; inset: 0 — it takes over the viewport. Mount it once per page. For Next.js, the page that hosts it must be a client component ('use client') and, under static export, gated behind a mounted flag so SSR HTML stays empty.
The shell auto-fits the camera on first paint, so panels appear pre-framed. After that, camera control is yours via useWhiteboardStore (fitToContent, focusPanel,resetWidgets).
On unmount the shell calls resetSession(). Don't mount two shells in the same page — the unmount of either nukes shared state.