DOSage API Documentation - v0.1.0
    Preparing search index...

    DOSage API Documentation - v0.1.0

    DOSage

    A TypeScript component library recreating DOS-era interfaces for modern web applications.

    CI Status npm version npm downloads License: MIT

    ╔═══════════════════════════════════════════════════════════════════╗
    ║ ║
    ║ ██████╗ ██████╗ ███████╗ █████╗ ██████╗ ███████╗ ║
    ║ ██╔══██╗██╔═══██╗██╔════╝██╔══██╗██╔════╝ ██╔════╝ ║
    ║ ██║ ██║██║ ██║███████╗███████║██║ ███╗█████╗ ║
    ║ ██║ ██║██║ ██║╚════██║██╔══██║██║ ██║██╔══╝ ║
    ║ ██████╔╝╚██████╔╝███████║██║ ██║╚██████╔╝███████╗ ║
    ║ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ║
    ║ ║
    ╚═══════════════════════════════════════════════════════════════════╝
    • Pure TypeScript — Full type safety with comprehensive type definitions
    • Zero Dependencies — No runtime dependencies, minimal footprint
    • Framework Agnostic — Works with vanilla JS/TS, React, Vue, or any framework
    • Accessible — Full ARIA support and keyboard navigation
    • Themeable — Multiple preset themes + custom theme support
    • DOS Authentic — Faithful recreation of DOS-era aesthetics
    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',
    // ...
    },
    // ...
    });
    • Container
    • Panel
    • Box
    • Grid
    • Divider
    • Separator
    • Heading
    • Text
    • Code
    • CodeBlock
    • Blockquote
    • List
    • DefinitionList
    • Label
    • ASCIIArt
    • Button
    • ButtonGroup
    • IconButton
    • Link
    • TextInput
    • Textarea
    • Checkbox
    • RadioButton
    • Select
    • Slider
    • Alert
    • Toast
    • ProgressBar
    • Spinner
    • Skeleton
    • Tooltip
    • Menu
    • ContextMenu
    • Tabs
    • Breadcrumb
    • Pagination
    • Table
    • Card
    • Badge
    • Avatar
    • Window
    • Dialog

    All components are built with accessibility in mind:

    • Full keyboard navigation
    • ARIA attributes
    • High contrast focus states
    • Screen reader friendly
    • Chrome (latest)
    • Firefox (latest)
    • Safari (latest)
    • Edge (latest)
    # 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 💾