Getting Started
Create your first WireScript wireframe in 5 minutes.
This guide takes you from zero to a complete wireframe in 5 minutes. Every code block below is interactive — edit directly or try examples in the playground.
Try the Playground
Open the WireScript Playground in a new tab to experiment as you learn. Paste any example, tweak it, and see changes instantly.
Your First Element
Let's start with a single button:
That's it. Parentheses, element type, content string. Elements that display text follow this pattern.
Add a flag to change its style:
Flags are keywords that modify behavior. :primary makes the button stand out.
Grouping Elements
Use box to group elements together. By default, elements stack vertically:
Add :gap to control spacing:
Use :high and :low to control text emphasis:
Try :row for horizontal layout:
You can use :col to be explicit about vertical layout, but it's optional since that's the default.
Adding Inputs
Use input for form fields. The :type property controls the input style:
Building a Card
Now combine everything into a card:
Notice the pattern:
cardis a styled container with border and shadow:padding 20adds space inside:fullmakes the button span full width
Adding a Screen
Wrap your UI in a screen inside a wire document:
The screen has:
- ID (
signup) — for navigation - Name (
"Sign Up") — display title - Viewport (
:desktop) — size hint
Adding a Modal
Use modal to create overlays. Reference them with #id:
The pattern:
modallives inside the screen, after the main content:id "forgot"gives the modal a name:to #forgotopens it (note the#prefix):to :closecloses the current overlay
Try it
Click "Forgot password?" to open the modal, then "Cancel" to close it.
Multiple Screens & Navigation
Create a flow between screens using :to:
Try it
Click the "Sign up" text in the preview to navigate between screens.
Complete Example
Let's combine everything into a polished auth flow with multiple screens and a modal:
Try it
Navigate between screens and open the forgot password modal to see everything working together.
Syntax Summary
Every element follows this pattern:
(element-type "content" :flags :property value children)| Part | Description | Example |
|---|---|---|
element-type | What to render | button, text, box, card |
"content" | Text content (optional) | "Click me", "Welcome" |
:flags | Boolean modifiers | :primary, :col, :center |
:property value | Key-value pairs | :gap 16, :to login |
children | Nested elements | (box (text "hi")) |
Common Flags
| Category | Flags | Description |
|---|---|---|
| Layout | :row, :col | Flex direction |
| Sizing | :full | Fill available space |
| Alignment | :center, :start, :end | Content positioning |
| Variants | :primary, :ghost, :danger | Visual style |
| Emphasis | :high, :medium, :low | Text prominence |