A TypeScript component library recreating DOS-era interfaces for modern web applications.
╔═══════════════════════════════════════════════════════════════════╗
║ ║
║ ██████╗ ██████╗ ███████╗ █████╗ ██████╗ ███████╗ ║
║ ██╔══██╗██╔═══██╗██╔════╝██╔══██╗██╔════╝ ██╔════╝ ║
║ ██║ ██║██║ ██║███████╗███████║██║ ███╗█████╗ ║
║ ██║ ██║██║ ██║╚════██║██╔══██║██║ ██║██╔══╝ ║
║ ██████╔╝╚██████╔╝███████║██║ ██║╚██████╔╝███████╗ ║
║ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ║
║ ║
╚═══════════════════════════════════════════════════════════════════╝
npm install dosage
import { createButton, ThemeManager } from 'dosage';
import 'dosage/css';
// Initialize theme
ThemeManager.setTheme('dos-blue');
// Create a button
const button = createButton({
label: 'Click Me!',
variant: 'primary',
onClick: () => alert('Hello, DOS!'),
});
document.body.appendChild(button);
DOSage includes several preset themes:
| Theme | Description |
|---|---|
dos-blue |
Classic DOS blue screen (default) |
amber |
Amber monochrome monitor |
green-phosphor |
Green phosphor CRT |
cga |
IBM CGA 16-color palette |
import { ThemeManager } from 'dosage';
// Set theme
ThemeManager.setTheme('amber');
// Get current theme
const current = ThemeManager.getTheme();
// Register custom theme
ThemeManager.registerTheme('my-theme', {
name: 'my-theme',
colors: {
bg: '#1a1a2e',
fg: '#eee',
// ...
},
// ...
});
All components are built with accessibility in mind:
# Install dependencies
npm install
# Start demo server
npm run dev
# Run tests
npm test
# Build library
npm run build
MIT © DOSage Contributors
Bringing the nostalgic DOS aesthetic to modern web applications 💾