package
React.js components for a faithful Windows 95 aesthetic
npm install ninetyfiveGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Estimated unpacked size across 3 packages.
7.8 MB
Includes dependencies.
npm install / yarn add the ninetyfive package.
Then you can do this:
import { StaticWindow } from 'ninetyfive';
ReactDOM.render(
<StaticWindow title="Hello World">Window contents</StaticWindow>,
document.getElementById('root'));Low hanging fruit that you can help fix:
Scroll to the end of this document for contributor guidelines.
Simple plain blue background with default desktop color
props
children: React.NodeDOM
div.W95__Desktop
{children}Fixed-position element (doesn't scroll with page!) with title bar, window decoration, and contents.
titleExtra exists so you can pass title as a simple string if you don't need extra window decorations.
props
title: stringtitleExtra: React.Node (Probably one or more <TinyButton /> elements; need keys!)margin: Number|null (Margin between outside of window and its container)style: Object|null (CSS styles for outermost div)windowStyle: Object|null (CSS styles for innermost div)children: React.NodeDOM
div.W95__Window.m-static style={style}
div.W95__WindowBG
div.W95__WindowTitle
{title}
{titleExtra}
div.W95__WindowContents style={windowStyle || {}}
{children}Draggable window element. You must provide size via the style prop. Built-in close button.
Use windowStyle to set size. The window is initially centered by flexbox, so you don't need to necessarily make it a constant size.
props
title: stringcanClose: bool (If true, show close button)isOpen: bool (If false, don't render)onClose: function(): void (Called when X button clicked)windowStyle: Object|null (CSS styles for window div)children: React.NodeDOM
div.W95__MovableWindowContainer
div.W95__MovableWindowContainer__Centerer // transform applied here
div.W95__Window m-movable style={windowStyle}>
div.W95__WindowBG
div.W95__WindowTitle
{title}
TinyButton
div.W95__WindowContents
{children}Draws a thin line around its content and adds a title in the upper left.
props
title: stringclassName: stringchildren: React.NodeDOM
div.W95__Group.{className || ''}
div.W95__Group__BG
div.W95__Group__Title
{title}
div.W95__Group__Contents
{children}White box with overflow: auto. There is probably a more accurate name for this component.
You need to set a height yourself or use className="m-fill-container".
props
style: Object|nullclassName: string|nullchildren: React.NodeDOM
div.W95__ScrollingText.{className || ''} style={style}
div.W95__ControlBG
div.W95__ScrollingText__Content
{children}Unimplemented:
Simple shorthand for <button> with some inner chrome
props are simply everything from native <button> element. children are moved to an inner <span> for styling.
DOM
button.W95__Button {...props}
div.W95__ButtonBG
div.W95__Button__FocusBG
span.W95__Button__Text
{props.children}props
checked: boollabel: React.NodeonChange: function(): voidDOM
div.W95__Checkbox
div.W95__Checkbox__Box
div.W95__ControlBG
<svg />
input[type=checkbox]
label
{label}props
items: string[]selectedItemIndex: intonSelect: function(int): voidDOM
div.W95__List
div.W95__ControlBG
div.W95__List__Contents
div.W95__List__ListItem[.m-selected]
{item}props
value: stringonChange: function(Event): voidDOM
div.W95__TextInput
div.W95__ControlBG
input[type=text]Window decoration button
props
style: Object|nullclassName: string|nullonClick: function(Event): voidchildren: React.NodeDOM
div.W95__TinyButton.{className || ''} style={style}
div.W95__ButtonBG
{children}W95__ or m-.W95__ReactComponentName.W95__ReactComponentName__SemanticSubcomponentName.
W95__WindowTitle.m-foo-bar. For example, you could end up with W95__List__ListItem m-selected.