Skip to content

Demos

Runnable RSPFx examples in examples/ plus one external project. Every example scaffolds via rspfx new, builds with rspfx build, and packages with rspfx package to sharepoint/solution/*.sppkg.

Clone the repo and run any demo with rspfx dev on http://localhost:4321 (local preview) or https://localhost:4321 when a tenant is set via dev.tenantUrl or --tenant. See getting-started.md and commands.md.

DemoStackRepo
Play Fish — SPFx ChessSolid 1.9 · Tailwind v4 · Stockfish 18 Lite WASM · chessground · Rspack · SPFx 1.22master8848/spfx-with-rspfx-chess-demo

Play Fish is a SharePoint web part that plays chess against Stockfish 18 Lite in the browser.

Engine runs as WebAssembly (~7 MB, single-threaded) in a Web Worker, so the UI never blocks. UI is Solid.js with Tailwind v4 and chessground. Rules are chess.js (castling, en passant, promotion, checkmate/stalemate, PGN). Board supports drag & drop, animations, last-move/check highlights, legal-move dots, flip, and keyboard navigation.

Games persist to a SharePoint list Chess Games (created on first use via PnPjs, columns PGN/Moves/Result/WhiteElo/BlackElo/WhiteName/BlackName/Site) and fall back to localStorage demo mode without a SharePoint context. Includes 7 Elo levels (700–2800), thinking timer, confetti on win, and theme-aware styling (data-theme="light|dark").

What it proves for RSPFx: non-React framework at a modern version, ~7 MB WASM asset handling, Web Worker chunk, Tailwind v4 PostCSS pipeline, and a single rspack.config.ts with RspfxPlugin (packages/plugin/src/index.ts). See the demo repo for pnpm dev / pnpm build / pnpm package and deployment steps.

All demos at a glance

DemoFrameworkBundlerPathDescription
feedback (React 19)React 19Vite 8examples/vite-react19Form with validation that saves to a SharePoint list
hello-reactReact 18Rspackexamples/reactBasic hello world
hello-react (Vite)React 18Viteexamples/vite-reactSame hello world, built with Vite
hello-react (Rsbuild)React 18Rsbuildexamples/rsbuild-reactSame hello world, built with Rsbuild
hello-solidSolidRspackexamples/solidReactive hello world
hello-solid (Rsbuild)SolidRsbuildexamples/rsbuild-solidSame Solid hello world, built with Rsbuild
hello-vanillaVanilla TSRspackexamples/vanillaNo framework, plain TypeScript
hello-vanilla (Vite)Vanilla TSViteexamples/vite-vanillaPlain TypeScript, built with Vite
hello-preactPreactRspackexamples/preactLightweight React alternative
hello-vueVue 3Rspackexamples/vueVue single-file component
hello-svelteSvelteRspackexamples/svelteSvelte with scoped styles
shadcnReact 18 + Tailwind v4Rspackexamples/shadcnStyled UI with Tailwind and shadcn
mixedReact 18Viteexamples/mixedWeb part plus extension and library
modern-searchReact 17 · Fluent UI 8Rspackexamples/modern-searchLarge real-world search solution

All examples/* share deterministic GUIDs for docs and tests (e.g. react and vite-react both use component 11111111-1111-4111-8111-111111111101, solution 22222222-2222-4222-8222-222222222201). Do not install two variants with overlapping IDs on the same tenant; regenerate with crypto.randomUUID(). See project-structure.md and examples/README.md.

By framework

Framework is set via --framework at scaffold time (rspfx new --framework vue) and via framework: in plugin options (@mbsks/rspfx-plugin / @mbsks/rspfx-core). Each framework ships a preset with loaders/SWC options and a *WebPart base class plus a headless adapter (@mbsks/rspfx-framework-<fw>/headless).

All frameworks support rspfx dev --refresh where the preset provides HMR (see fast-refresh.md).

By bundler

RSPFx exposes one plugin per bundler with the same options shape. Pick the config file, not a different API:

See architecture.md for the pipeline and building-packages.md for rspfx build / rspfx package outputs.

Production-scale and multi-component

Running a demo

npm install

Each example also supports rspfx doctor, rspfx clean, and rspfx analyze via apps/cli/src/commands/*. External chess demo uses pnpm and rspack.config.tspnpm install && pnpm dev auto-fetches the Stockfish engine, then pnpm build / pnpm package.

Released under the MIT License.