98ts
v0.0.6
Published
Vanilla TypeScript components styled like Windows 98
Readme
98ts
A lightweight, vanilla TypeScript library for creating interactive 98.css components
Bring retro Windows 98 UI elements to life with TypeScript - fully class-based, framework-free, and ready to drop into modern projects like Vite or Webpack.
Features
- Minimal, vanilla TypeScript classes for components like
Button,Window, andCheckbox. - Easy DOM integration via
.elproperty. - Fully typed with TypeScript for autocompletion and safety.
- Framework-agnostic — works anywhere that uses modern JavaScript/TypeScript.
- Designed to complement 98.css styling
Installation
npm install 98ts
# or
pnpm install 98tsMake sure to also include 98.css in your project:
<link rel="stylesheet" href="https://unpkg.com/98.css">Alternatively, you can grab 98.css from the releases page or npm.
npm install 98.css
# or
pnpm install 98.cssUsage
import { Button } from "98ts";
// Create a new button
const btn = new Button({
label: "Click Me!",
onClick: () => alert("Hello, retro world!"),
});
// Append it to the DOM
document.body.appendChild(btn.el);Components
Coming soon
API Style
All components follow the same object-oriented style:
const component = new Component(props);
document.body.appendChild(component.el);.elexposes the underlying DOM element- Fully compatible with modern bundlers like Vite, Rollup, and Webpack
License
MIT
