Getting Started with wiremd
This guide will help you get started with wiremd, a text-first UI design tool for creating wireframes using Markdown syntax.
Installation
Install wiremd using your preferred package manager:
bash
# npm
npm install wiremd
# yarn
yarn add wiremd
# pnpm
pnpm add wiremdFor global CLI access:
bash
npm install -g wiremdYour First Wireframe
Create a new file called my-wireframe.md:
markdown
## Login Form
Email
[_____________________________]{type:email}
Password
[_____________________________]{type:password}
[Login]{.primary} [Forgot Password?]{.link}Render to HTML
Using the CLI:
bash
wiremd my-wireframe.md -o login.htmlUsing the API:
typescript
import { parse, renderToHTML } from 'wiremd';
import { readFileSync, writeFileSync } from 'fs';
const markdown = readFileSync('my-wireframe.md', 'utf-8');
const ast = parse(markdown);
const html = renderToHTML(ast);
writeFileSync('login.html', html);Basic Concepts
Components
wiremd supports many UI components:
- Forms: inputs, textareas, buttons, selects
- Layout: sections, containers, grids
- Navigation: nav bars, breadcrumbs, tabs
- Content: headings, paragraphs, images, icons
Syntax Elements
- Headings - Define sections and structure
- Brackets - Create inputs and buttons
[...] - Attributes - Add properties
{type:email required} - Classes - Style components
{.primary} - Containers - Group elements
:::
Visual Styles
wiremd comes with multiple visual styles:
sketch- Balsamiq-inspired hand-drawn (default)clean- Modern minimal designwireframe- Traditional grayscalematerial- Material Designtailwind- Tailwind-inspiredbrutal- Brutalist designnone- Unstyled semantic HTML
Change style with the --style flag:
bash
wiremd my-wireframe.md --style cleanWatch Mode
For rapid iteration, use watch mode with live-reload:
bash
wiremd my-wireframe.md --watch --serve 3000Open http://localhost:3000 in your browser. Changes to your markdown file will automatically reload.