dreamdesk-ui
v2.0.0
Published
Dreamdesk UI — Web Components and React component library.
Readme
DreamDesk UI
Vanilla JS Web Components for retro-style windows, controls, and theming.
CDN Usage (no build tools)
Add the script as a module and pick a theme by setting data-theme on html.
<!doctype html>
<html data-theme="pastelcore">
<head>
<meta charset="utf-8" />
<script type="module" src="https://cdn.jsdelivr.net/npm/dreamdesk-ui@1/js/dreamdesk.js"></script>
</head>
<body>
<dreamdesk-window title="Hello" width="420" height="260"></dreamdesk-window>
</body>
</html>Notes:
- Base styles are auto-injected by the component.
- Themes are controlled via
data-themeonhtml:default,pastelcore,dark.
Installing via npm
npm install dreamdesk-uiThen import in your app:
<script type="module" src="/node_modules/dreamdesk-ui/js/dreamdesk.js"></script>Components
<dreamdesk-window>: basic window with minimize, fullscreen, close- Attributes:
title,resizable(default true),movable(default true) - Sizing:
- Tokens:
size="sm|md|lg" - Overrides:
width,height(raw CSS lengths). When either is present the host switches to explicit mode. - CSS Vars:
--ddw-w,--ddw-h,--ddw-min-w,--ddw-min-h,--ddw-max-w,--ddw-max-h
- Tokens:
- Attributes:
<dreamdesk-button>: themed button- Attributes:
variant(primary|ghost|help),action - Sizing:
- Tokens:
size="sm|md|lg" - Overrides:
min-width,width,height,font-size,px(x padding),py(y padding) - CSS Vars:
--dd-btn-min-w,--dd-btn-w,--dd-btn-h,--dd-btn-fs,--dd-btn-px,--dd-btn-py,--dd-btn-border
- Tokens:
- Attributes:
<dreamdesk-progress-bar>: linear progress, solid or blocky- Attributes:
value(0-100),gradient,blocky - Responsive by default (fills container width)
- Sizing:
- Token:
size="sm|md|lg"(via container or custom CSS) - Overrides: set
--dd-pb-hon the element to control height
- Token:
- Attributes:
See css/* for available themes.
Development
npm install
npm startLicense
MIT
