react98

Window

A Windows 98 window shell with title bar, controls, and body slots.

Preview

window.exe
Setup

Install Windows 98 styled components?

Installation

pnpm dlx shadcn@latest add https://react98-ui.vercel.app/r/window.json
npx shadcn@latest add https://react98-ui.vercel.app/r/window.json
yarn dlx shadcn@latest add https://react98-ui.vercel.app/r/window.json
bunx shadcn@latest add https://react98-ui.vercel.app/r/window.json

Usage

import {
  Window,
  WindowBody,
  WindowControl,
  WindowControls,
  WindowTitle,
  WindowTitleBar,
} from "@/components/ui/98/window";

export function Example() {
  return (
    <Window>
      <WindowTitleBar>
        <WindowTitle>My App</WindowTitle>
        <WindowControls>
          <WindowControl label="_" />
          <WindowControl label="□" />
          <WindowControl label="×" />
        </WindowControls>
      </WindowTitleBar>
      <WindowBody>Content</WindowBody>
    </Window>
  );
}

Props

ComponentPropsDescription
WindowHTMLAttributes<HTMLDivElement>Outer window surface.
WindowTitleBarHTMLAttributes<HTMLDivElement>Title bar row.
WindowTitleHTMLAttributes<HTMLDivElement>Title text container.
WindowControlsHTMLAttributes<HTMLDivElement>Groups title bar controls.
WindowControlButtonHTMLAttributes<HTMLButtonElement> & { label: "_" | "□" | "×" }Minimize, maximize, or close control.
WindowBodyHTMLAttributes<HTMLDivElement>Window content area.

On this page