Convert Figma logo to code with AI

khang-nd logo7.css

A JS-independent, tree-shakeable CSS framework for building faithful recreations of the Windows 7 UI.

1,580
80
1,580
8

Top Related Projects

9,000

A design system for building faithful recreations of old UIs

2,205

A CSS framework for building faithful recreations of operating system GUIs.

A design system for building retro Apple interfaces

6,607

🌈🕹 Windows 95 style UI component library for React

Quick Overview

7.css is a CSS framework that replicates the look and feel of Windows 7 GUI elements. It allows developers to create web interfaces that mimic the classic Windows 7 style, providing a nostalgic and familiar user experience for those who fondly remember this operating system.

Pros

  • Accurately recreates the Windows 7 aesthetic, including buttons, windows, and form elements
  • Easy to implement with minimal setup required
  • Customizable through CSS variables
  • Lightweight and doesn't require JavaScript

Cons

  • Limited to a specific design style, which may not be suitable for modern web applications
  • May look outdated to users unfamiliar with Windows 7
  • Lacks responsiveness for mobile devices out of the box
  • Maintenance and updates may be infrequent due to the niche nature of the project

Code Examples

  1. Basic button styling:
<button class="win7-btn">Click me</button>
  1. Creating a window:
<div class="win7-window">
  <div class="win7-window-titlebar">Window Title</div>
  <div class="win7-window-content">
    <p>Window content goes here.</p>
  </div>
</div>
  1. Styling a progress bar:
<progress class="win7-progress" value="70" max="100"></progress>

Getting Started

To use 7.css in your project, follow these steps:

  1. Include the CSS file in your HTML:
<link rel="stylesheet" href="https://unpkg.com/7.css">
  1. Add the appropriate classes to your HTML elements:
<div class="win7-desktop">
  <div class="win7-window">
    <div class="win7-window-titlebar">My Window</div>
    <div class="win7-window-content">
      <button class="win7-btn">Click me</button>
      <input type="text" class="win7-input" placeholder="Enter text">
    </div>
  </div>
</div>
  1. Customize the appearance using CSS variables if needed:
:root {
  --win7-accent-color: #0078d7;
}

Competitor Comparisons

9,000

A design system for building faithful recreations of old UIs

Pros of 98.css

  • More comprehensive, covering a wider range of UI elements
  • Better documentation and examples on the project's website
  • Larger community and more frequent updates

Cons of 98.css

  • Larger file size, potentially impacting page load times
  • Less focused on a specific Windows version, mixing elements from different eras

Code Comparison

98.css:

.window {
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff;
  background: silver;
  padding: 3px;
}

7.css:

.window {
  border: 1px solid #707070;
  box-shadow: 0 0 0 1px #f0f0f0 inset;
  background: linear-gradient(to bottom, #f0f0f0, #ffffff);
  padding: 2px;
}

Both projects aim to recreate classic Windows UI styles in CSS, but they focus on different versions. 98.css emulates Windows 98, while 7.css targets Windows 7. 98.css offers a more extensive set of UI components and has a larger community, making it potentially more suitable for larger projects. However, 7.css provides a more modern look and may be preferable for applications seeking a Windows 7-specific aesthetic. The code comparison shows how each library approaches styling window elements, with 98.css using more complex box-shadow properties to achieve the classic look, while 7.css employs a simpler border and gradient approach for a sleeker appearance.

2,205

A CSS framework for building faithful recreations of operating system GUIs.

Pros of XP.css

  • More comprehensive set of UI components, including form elements and icons
  • Includes JavaScript for functional components like windows and menus
  • Offers a wider range of customization options through CSS variables

Cons of XP.css

  • Larger file size due to more extensive features
  • May require more setup and configuration for complex layouts
  • Less focused on a specific Windows version, potentially less authentic for XP purists

Code Comparison

7.css:

.window {
  background: #fff;
  border: 1px solid #000;
  box-shadow: inset -1px -1px #dfdfdf, inset 1px 1px #fff;
}

XP.css:

.xp_window {
  background: linear-gradient(180deg, #0997ff, #0053ee 8%, #0050ee 40%, #06f);
  border: 1px solid #0831d9;
  box-shadow: inset -1px -1px #00138c, inset 1px 1px #0831d9, inset -2px -2px #001ea0, inset 2px 2px #166aee, inset -3px -3px #003bda, inset 3px 3px #0855dd;
}

Both projects aim to recreate classic Windows UI styles in CSS, with 7.css focusing specifically on Windows 7 and XP.css offering a more general Windows XP-inspired look. XP.css provides more features and customization options, while 7.css offers a more streamlined and focused approach for Windows 7 styling.

A design system for building retro Apple interfaces

Pros of system.css

  • Lighter and more minimalistic approach to Windows-style UI
  • Focuses on core UI elements without extensive theming
  • Easier to integrate into existing projects due to simplicity

Cons of system.css

  • Less comprehensive coverage of Windows UI elements
  • Lacks some advanced features and customization options
  • May not provide as authentic a Windows experience as 7.css

Code Comparison

system.css:

.window {
  background: #c0c0c0;
  border: 1px solid #000000;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff;
}

7.css:

.window {
  background: linear-gradient(180deg, #fff 0%, #ece9d8 100%);
  border: 1px solid #0a0a0a;
  box-shadow: inset 1px 0 #fff, inset 0 1px #fff, inset -1px 0 #a9a9a9, inset 0 -1px #a9a9a9;
}

Both projects aim to recreate Windows UI styles in CSS, but 7.css offers a more detailed and authentic Windows 7 look, while system.css provides a simpler, more generic Windows-inspired style. 7.css includes more UI components and customization options, making it better suited for projects requiring a complete Windows 7 aesthetic. system.css, on the other hand, is more lightweight and easier to implement in projects that only need basic Windows-style elements.

6,607

🌈🕹 Windows 95 style UI component library for React

Pros of React95

  • Built with React, offering component-based architecture and easier integration with React applications
  • More extensive set of UI components, including buttons, windows, and form elements
  • Active development with regular updates and a larger community

Cons of React95

  • Heavier dependency footprint due to React ecosystem
  • Steeper learning curve for developers not familiar with React
  • May require additional configuration for non-React projects

Code Comparison

7.css (CSS-only approach):

.window {
  background: #c0c0c0;
  border: 1px solid #000000;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff;
}

React95 (React component):

import { Window } from 'react95';

const MyWindow = () => (
  <Window>
    <Window.Content>Window content goes here</Window.Content>
  </Window>
);

Both projects aim to recreate the Windows 95 UI, but they take different approaches. 7.css focuses on providing a lightweight, CSS-only solution that can be easily integrated into any project. React95, on the other hand, offers a more comprehensive set of React components with additional functionality and interactivity. The choice between the two depends on the specific project requirements, development stack, and desired level of customization.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

7.css

npm gzip size

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

7.css is a CSS framework that takes semantic HTML and styles them to the Windows 7 design. It is built on top of XP.css, which is an extension of 98.CSS.

It does not ship with any JavaScript, so it is compatible with your frontend framework of choice.

📦 Installation / Usage

Directly via unpkg:

<!DOCTYPE html>
<html>
  <head>
    <title>7.css example</title>
    <meta charset="UTF-8" />
    <link rel="stylesheet" href="https://unpkg.com/7.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>

Via npm:

npm install 7.css

Then import it as below:

import "7.css/dist/7.css";

📚 Documentation / Demo

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

🛠 Developing

Clone the repo and run npm install.

The core styles are managed in gui.

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.

You are so welcome to report issues, help out with contributions or whatever you could think of to improve this lovely UI framework.

⚙ Integrations

7.css has been seen adopted in the following JS framework projects by the community:

📜 Changelog

Refer to Releases.

NPM DownloadsLast 30 Days