Code Monkey home page Code Monkey logo

xp.css's Introduction

XP.css

npm gzip size

A design system for building faithful recreations of old UIs.

a screenshot of a window with the title 'My First Program' and two buttons OK and Cancel, styled like a Windows XP dialog

a screenshot of a window with the title 'My First Program' and two buttons OK and Cancel, styled like a Windows 98 dialog

XP.css is an extension of 98.css. A CSS file that takes semantic HTML and makes it look pretty. It does not ship with any JavaScript, so it is compatible with your frontend framework of choice.

Installation / Usage

The easiest way to use XP.css is to import it from unpkg.

<!DOCTYPE html>
<html>
  <head>
    <title>XP.css example</title>
    <meta charset="UTF-8" />
    // Windows XP Theme (include only one theme at a time)
    <link rel="stylesheet" href="https://unpkg.com/xp.css" />
    // Windows 98 Theme (include only one theme at a time)
    <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/98.css" />
  </head>

  <body>
    <div class="window" style="margin: 32px; width: 250px">
      <div class="title-bar">
        <div class="title-bar-text">
          My First Program
        </div>
      </div>
      <div class="window-body">
        <p>Hello, world!</p>
      </div>
    </div>
  </body>
</html>

Alternatively, you can grab XP.css from npm.

npm install xp.css

Usage:

// For XP
import "xp.css/dist/XP.css";

// For 98
import "xp.css/dist/98.css";

Here is an example of XP.css being used with React, and an example with vanilla JavaScript.

Refer to the documentation page for specific instructions on this library's components.

Developing

Clone the repo and run npm install.

The core styles are managed in gui.

To create your own theme for the GUI you can extend the core styles. See the XP and 98 themes

You can use npm start to start a development environment that will watch for file changes and rebuild the files, reloading your browser in the process.

You can run a build manually with npm run build. This will write to the dist/ directory.

Issues, Contributing, etc.

I would love to see other people's work on gui.css, if anyone else if up for creating a theme for another OS using this framework. Also new components and bugs/issues are also welcome! Feel free to contribute in whatever way you like!

Also please refer to the GitHub issues page for jdan's 98.css.

License

MIT

xp.css's People

Contributors

jdan avatar botoxparty avatar kaytwo avatar muan avatar andreymazepas avatar dependabot[bot] avatar teodragovic avatar n055 avatar jacob-macleod avatar mattbegent avatar sirocyl avatar mantaraix avatar neverage avatar rbstrachan avatar xheinrich avatar mpopv avatar modernserf avatar joaonunomota avatar loama avatar dwhinham avatar cassiohub avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.