ProzillaOS/packages/prozilla-os
2024-06-20 18:19:03 +02:00
..
src Optimized package builds 2024-06-20 18:19:03 +02:00
CHANGELOG.md Optimized package builds 2024-06-20 18:19:03 +02:00
package.json Optimized package builds 2024-06-20 18:19:03 +02:00
README.md Updated README files 2024-06-18 17:27:48 +02:00
tsconfig.json Optimized package builds 2024-06-20 18:19:03 +02:00
vite.config.ts Optimized package builds 2024-06-20 18:19:03 +02:00


ProzillaOS

License Stars Forks NPM Version

About

prozilla-os is a React component library written in TypeScript for building web-based operating systems, made by Prozilla.

Installation

$ npm install prozilla-os
$ yarn add prozilla-os
$ pnpm add prozilla-os

Usage

import { Desktop, ModalsView, ProzillaOS, Taskbar, WindowsView } from "prozilla-os";

function App() {
  return (
    <ProzillaOS systemName="Example" tagLine="Powered by ProzillaOS">
      <Taskbar/>
      <WindowsView/>
      <ModalsView/>
      <Desktop/>
    </ProzillaOS>
  );
}

<ProzillaOS> props

{

  systemName: string,

  tagLine: string,

  config: {
    apps: new AppsConfig({

      apps: App[]

    }),
    desktop: new DesktopConfig({

      /** Array of URLs of wallpaper images */
      wallpapers: string[],

      /** URL of default wallpaper image */
      defaultWallpaper: string,

      /**
       * @default 1
       */
      defaultIconSize: 0 | 1 | 2,

      /**
       * 0: vertical, 1: horizontal
       * @default 0
       * */
      defaultIconDirection: 0 | 1

    }),
    modals: new ModalsConfig({

      /**
       * Default size of a dialog box
       * @default new Vector2(400, 200)
       */
      defaultDialogSize: Vector2,

      /**
       * Default size of a file selector
       * @default new Vector2(700, 400)
       */
      defaultFileSelectorSize: Vector2

    }),
    taskbar: new TaskbarConfig({

      /**
       * Height of the taskbar in CSS pixels
       * @default 3 * 16
       */
      height: number

    }),
    tracking: new TrackingConfig({

      /**
       * Enable tracking
       * @default true
      */
      enabled: boolean,

      /** Google Analytics measurement ID */
      GAMeasurementId: string

    }),
    virtualDrive: new VirtualDriveConfig({

      fileIcon: string,
      infoFileIcon: string,
      textFileIcon: string,
      codeFileIcon: string,

      folderIcon: string,
      imagesFolderIcon: string,
      textFolderIcon: string,
      folderLinkIcon: string

    }),
    windows: new WindowsConfig({

      /**
       * @default 32
       */
      screenMargin: number,

      /**
       * @default "-"
       */
      titleSeparator: string,

      /**
       * If the user's screen is smaller than these values, windows will always be maximized
       * @default new Vector2(350, 350)
       */
      minScreenSize: Vector2

    })
  }

}