--- id: popmechanic/VibesOS/design version: "80b0000f" license: MIT install: manual updated: 2026-07-27 --- # design — Design takes a complete HTML file and mechanically converts it into a React component backed by TinyBase, preserving structure and CSS while replacing static content with reactive data bindings. The transformation follows deterministic rules—converting class attributes to className, inline styles to objects, and vanilla JavaScript to React hooks—rather than reinterpreting the design. Use this skill when you have a mockup or prototype that needs to become a functional Vibes app. Publisher: popmechanic · Stars: 134 · Updated: 2026-07-27 Install (manual): `git clone https://github.com/popmechanic/VibesOS` ## SKILL.md > **Plan mode**: If you are planning work, this entire skill is ONE plan step: "Invoke /vibes:design". Do not decompose the steps below into separate plan tasks. **Display this ASCII art immediately when starting:** ``` ░▒▓███████▓▒░░▒▓████████▓▒░░▒▓███████▓▒░▒▓█▓▒░░▒▓██████▓▒░░▒▓███████▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓██████▓▒░ ░▒▓██████▓▒░░▒▓█▓▒░▒▓█▓▒▒▓███▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓███████▓▒░░▒▓████████▓▒░▒▓███████▓▒░░▒▓█▓▒░░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░ ``` # Design Reference Transformer Transform a complete design reference HTML file into a working Vibes app with TinyBase reactive data. --- ## Core Principle > **Preserve and adapt, don't interpret and recreate.** The design reference is **source code to transform**, not inspiration to interpret. When given a complete HTML file with styles, your job is to make **minimal surgical changes** to connect it to React/TinyBase—not to recreate it from your understanding of its aesthetic. --- ## When to Use This Skill Use this skill when: - User provides a `design.html`, mockup, or static prototype file - User says "match this design exactly" or "use this as a reference" - User wants their existing HTML converted to a Vibes app - A previous implementation didn't match the design reference --- ## The Transformation is Mechanical The conversion from design HTML to React/TinyBase is **deterministic, not creative**: | Transformation | Rule | Example | |----------------|------|---------| | Attributes | `class` → `className` | `class="btn"` → `className="btn"` | | Attributes | `for` → `htmlFor` | `for="email"` → `htmlFor="email"` | | Attributes | kebab-case → camelCase | `stroke-width` → `strokeWidth` | | Self-closing | Add explicit close | `` → `` | | Comments | HTML → JSX | `` → `{/* x */}` | | Inline styles | String → Object | `style="color: red"` → `style={{ color: 'red' }}` | | Event handlers | Lowercase → camelCase | `onclick` → `onClick` | **CSS requires NO changes.** Copy the entire ` {/* HTML structure preserved, only syntax converted */} {/* Dynamic content replaced with {expressions} */} > ); } ``` ### Step 4: Handle Dark Mode Override (If Needed) The Vibes template has dark mode support. If your design is light-only, add this CSS override: ```css /* Force light theme regardless of system preference */ html, body, #container, #container > div { background-color: var(--your-bg-color) !important; } ``` **Note:** Avoid targeting `[style*="position: fixed"]` as this will style the VibesSwitch toggle button. ### Step 4b: Scope CSS to Avoid VibesSwitch/VibesPanel Conflicts The template includes a VibesSwitch toggle button and VibesPanel admin menu that sit **outside** your app container. Broad CSS selectors can accidentally style these components. **Watch for these problematic patterns:** | Problematic | Why | Safe Alternative | |-------------|-----|------------------| | `button { ... }` | Styles VibesSwitch toggle | `.app button { ... }` or `#container button { ... }` | | `* { ... }` (with colors/backgrounds) | Cascades everywhere | Scope to specific containers | | `[style*="position: fixed"]` | Targets VibesSwitch | Target by class/ID instead | | `body > div` | May match menu wrapper | Use `#container > div` | **If your design has global button/element styles:** 1. Wrap your app content in a container with a class: `