--- description: "UI/UX wireframe and mockup generation in draw.io at lo-fi, mid-fi, and hi-fi fidelity levels" triggers: - wireframe - mockup - ui design - ux wireframe - mobile mockup - web mockup - lo-fi - mid-fi - hi-fi - prototype - app screen globs: - "**/*.drawio" - "**/*.drawio.svg" --- # Wireframes & Mockups ## Fidelity Levels | Level | Purpose | Detail | When to Use | |-------|---------|--------|-------------| | Lo-fi | Concept exploration | Gray boxes, placeholder text, no color | Early ideation, stakeholder alignment | | Mid-fi | Layout validation | Real labels, basic styling, grayscale | Design review, developer handoff prep | | Hi-fi | Visual design | Brand colors, icons, realistic content | Client presentation, pixel-perfect handoff | --- ## draw.io UI Shape Libraries Enable wireframe shapes in draw.io: **File > Open Library > wireframe** or search "mockup" in shapes panel. ### Built-in Mockup Libraries | Library | Prefix | Contains | |---------|--------|----------| | Mockup Buttons | `mxgraph.mockup.buttons` | Buttons, toggles, radio, checkboxes | | Mockup Containers | `mxgraph.mockup.containers` | Windows, dialogs, panels, cards | | Mockup Forms | `mxgraph.mockup.forms` | Input fields, dropdowns, sliders, search bars | | Mockup Graphics | `mxgraph.mockup.graphics` | Icons, avatars, image placeholders | | Mockup Markup | `mxgraph.mockup.markup` | Headlines, paragraphs, lists, links | | Mockup Navigation | `mxgraph.mockup.navigation` | Navbars, tabs, breadcrumbs, sidebars | | Mockup Text | `mxgraph.mockup.text` | Labels, tooltips, badges | | Android | `mxgraph.android` | Android-native UI components | | iOS | `mxgraph.ios7` | iOS-native UI components | | Bootstrap | `mxgraph.bootstrap` | Bootstrap grid, components | --- ## Common Component Styles ### Browser Window Frame ```xml ``` ### Mobile Phone Frame (iPhone) ```xml ``` ### Android Phone Frame ```xml ``` ### Tablet Frame (iPad) ```xml ``` --- ## Lo-fi Wireframe Patterns ### Style Rules - Fill: `fillColor=#F5F5F5;` (light gray) or `fillColor=none;` - Stroke: `strokeColor=#999999;` (medium gray) - Text: `fontColor=#666666;fontSize=12;fontFamily=Helvetica;` - No shadows, no gradients, no brand colors - Use `X` pattern for image placeholders: `shape=mxgraph.mockup.graphics.simpleIcon;` ### Page Layout (Lo-fi) ```xml ``` --- ## Mid-fi Wireframe Patterns ### Style Rules - Fill: White (`#FFFFFF`) with light gray accents (`#F5F5F5`) - Stroke: `strokeColor=#CCCCCC;` or `#AAAAAA` - Primary action: `fillColor=#333333;fontColor=#FFFFFF;` (dark button) - Text: `fontColor=#333333;fontSize=13;fontFamily=Inter;` - Subtle shadows: `shadow=0;` (still no shadows at mid-fi) - Real labels and content, no "Lorem ipsum" ### Form Example (Mid-fi) ```xml ``` --- ## Hi-fi Mockup Patterns ### Style Rules - Use brand colors (set via variables or direct hex) - Shadows: `shadow=1;` on cards and modals - Border radius: `rounded=1;arcSize=8;` for modern look - Typography: `fontSize=14;fontFamily=Inter;` with weight hierarchy - Icons: Use `mxgraph.mockup.graphics` or inline SVG - Real content, real images (use image shapes with URLs) - Consistent spacing grid (8px increments) ### Dashboard Example (Hi-fi) ```xml ``` --- ## Mobile Screen Templates ### iOS Navigation Bar ```xml ``` ### iOS Tab Bar ```xml ``` ### Android Material Bottom Navigation ```xml ``` --- ## Responsive Breakpoints When designing for multiple screen sizes, create separate pages in the `.drawio` file: | Breakpoint | Width | Name | Use | |------------|-------|------|-----| | Mobile | 375px | `mobile` | iPhone SE / standard phones | | Tablet | 768px | `tablet` | iPad / tablets | | Desktop | 1280px | `desktop` | Standard laptop/desktop | | Wide | 1440px | `wide` | Large monitors | ### Multi-page XML Structure ```xml ``` --- ## Common UI Components ### Data Table ```xml ``` ### Modal / Dialog ```xml ``` ### Toast / Notification ```xml ``` --- ## Wireframe Annotation Use annotation shapes to communicate design decisions: ```xml ``` ### Annotation Color Code | Color | Hex | Meaning | |-------|-----|---------| | Red | `#DC2626` | Critical / must-fix | | Orange | `#EA580C` | Question / needs decision | | Blue | `#2563EB` | Developer note / implementation detail | | Green | `#16A34A` | Approved / signed-off | | Purple | `#9333EA` | Accessibility note | --- ## Screen Flow Diagrams Connect wireframe screens to show user navigation: ```xml ``` --- ## Best Practices 1. **Start lo-fi** — Validate layout before investing in visual polish 2. **Use 8px grid** — Set draw.io grid to 8px (`gridSize=8`) for consistent spacing 3. **Real content** — Use real text and realistic data, not "Lorem ipsum" 4. **Consistent sizing** — Buttons: 36-44px height; inputs: 36-40px; touch targets: 44px minimum 5. **Responsive thinking** — Design mobile-first, then expand to larger breakpoints 6. **Annotate decisions** — Use callouts to document why, not just what 7. **Version screens** — Use draw.io pages for iterations (v1, v2, v3) 8. **Export for review** — Use `.drawio.svg` for GitHub PRs, PNG for Slack/email