Reviving classic software in the browser is fun, nostalgic, and keeps UI history alive for modern devs.
- API reference: see
docs/API.md. - License: MIT.
src/holds the library source (components/,hooks/,engine/,types/).example/is a Vite + React + TypeScript demo that consumes the library from the repo root.src/Win95Calculator.tsxre-exports the public API.
- Install deps:
yarn install. - Run dev server:
yarn dev. - Type check:
yarn tsc. - Tests:
yarn test. - Library output is peer-based (react95 external). Build:
yarn build:lib:peer→dist/lib-peer(types indist/types).
Default import resolves to the peer build. If you’re consuming straight from the repo, alias to it:
// vite.config.ts
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'node:path';
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
windows95_calculator_react: path.resolve(__dirname, './dist/lib-peer/index.js'),
},
},
});When published, consumers can do:
import CalculatorWindow from 'windows95_calculator_react';(peer react95 expected)
- Use TypeScript + React.
- Prefer small components and shared hooks.
- Keep styling in
styled-componentsand match the Win95 look.
- Open
example/and runyarn install && yarn devto try the calculator as a consumer app.
- MIT (see
LICENSE).
- Some functions might not be perfect yet; PRs to fix or improve behavior are very welcome!
- Using styled-components v6 with react95 v4 can log prop-forwarding warnings (e.g.,
fullWidth,active). Functionality remains intact; keep it in mind when checking console output.
