Skip to content

Components Reference

Complete reference of all Wireweave components with examples.

Common Props

All components support the following common properties. These are inherited from the core type system and can be used on any component.

Spacing

AttributeTypeDescription
pnumberPadding (all sides)
pxnumberHorizontal padding
pynumberVertical padding
ptnumberPadding top
prnumberPadding right
pbnumberPadding bottom
plnumberPadding left
mnumberMargin (all sides)
mxnumber | autoHorizontal margin
mynumberVertical margin
mtnumberMargin top
mrnumberMargin right
mbnumberMargin bottom
mlnumberMargin left

Spacing values use a token scale: 0=0px, 1=4px, 2=8px, 3=12px, 4=16px, 5=20px, 6=24px, 8=32px. You can also specify explicit units (e.g., p=16px, m=2rem).

Sizing

AttributeTypeDescription
wnumber | full | auto | screen | fitWidth
hnumber | full | auto | screenHeight
minWnumberMinimum width
maxWnumberMaximum width
minHnumberMinimum height
maxHnumberMaximum height

Flex

AttributeTypeDescription
flexboolean | numberFlex grow
directionrow | column | row-reverse | column-reverseFlex direction
justifystart | center | end | between | around | evenlyMain axis alignment
alignstart | center | end | stretch | baselineCross axis alignment
wrapbooleanAllow wrapping
gapnumberGap between children

Position

AttributeTypeDescription
xnumberX position (for absolute positioning)
ynumberY position (for absolute positioning)

Appearance

AttributeTypeDescription
bgmuted | primary | secondaryBackground color
borderbooleanShow border

Interactive Props

The following components support interactive properties: button, link, card, image, avatar, badge, icon.

AttributeTypeDescription
navigatestringNavigate to another page or URL
opensstringOpens a modal, drawer, or overlay element by id
togglesstringToggles visibility or state of an element by id
actionstringCustom action identifier (e.g., "submit", "logout")
wireframe
button "Open Settings" opens="settings-modal"
button "Go Home" navigate="/home"
icon "menu" toggles="sidebar"
card action="select-item" { }

Layout

Components that define page structure.

page

Page root container. The starting point for all layouts.

wireframe
page "Dashboard" centered {
  // content
}
AttributeTypeDescription
titlestringPage title
viewportstringViewport size (e.g., "1440x900")
devicestringDevice preset (see below)
centeredbooleanCenter content
p, px, pynumberPadding
gapnumberGap between children

Device Presets:

CategoryPresetSizeDescription
Desktopdesktop-sm1280×800Small Laptop
desktop1440×900Desktop (default)
desktop-lg1920×1080Full HD
desktop-xl2560×1440QHD
Tabletipad1024×768iPad (Landscape)
ipad-portrait768×1024iPad (Portrait)
ipad-pro1366×1024iPad Pro 12.9"
ipad-pro-portrait1024×1366iPad Pro 12.9" (Portrait)
Mobileiphone-se375×667iPhone SE
iphone14390×844iPhone 14
iphone14-pro393×852iPhone 14 Pro
iphone14-pro-max430×932iPhone 14 Pro Max
android360×800Android
android-lg412×915Android Large

Page header area. Place navigation, logo, etc.

wireframe
header border {
  row justify=between {
    title "Logo" level=3
    nav { }
  }
}
AttributeTypeDescription
borderbooleanBottom border
p, px, pynumberPadding
gapnumberGap between children
justifystringMain axis alignment
alignstringCross axis alignment

main

Main content area.

wireframe
main {
  // main content
}

main scroll {
  // scrollable content
}
AttributeTypeDescription
scrollbooleanEnable vertical scrolling
p, px, pynumberPadding
gapnumberGap between children

Page footer area.

wireframe
footer border {
  text "Copyright 2026" muted
}
AttributeTypeDescription
borderbooleanTop border

Sidebar area.

wireframe
sidebar position=left w=240 {
  nav vertical { }
}
AttributeTypeDescription
positionleft | rightSidebar position
wnumberWidth

section

Section area. Groups content logically.

wireframe
section title="Settings" expanded {
  // content
}
AttributeTypeDescription
titlestringSection title
expandedbooleanExpanded state

Grid

Components for flex layout.

row

Horizontal flex container.

wireframe
row gap=4 justify=between align=center {
  button "Cancel" secondary
  button "Submit" primary
}
AttributeTypeDescription
gapnumberGap between children
justifystart | center | end | between | around | evenlyMain axis alignment
alignstart | center | end | stretch | baselineCross axis alignment
wrapbooleanAllow wrapping

col

Vertical flex container or grid column.

wireframe
row {
  col span=6 { }
  col span=6 { }
}

col scroll {
  // scrollable column
}
AttributeTypeDescription
span1-12Grid column width
sm, md, lg, xlnumberResponsive column width
scrollbooleanEnable vertical scrolling
ordernumberFlex order
gapnumberGap between children

stack

Vertical stack container. Each child takes only its content height (flex: 0 0 auto), unlike col which flexes to fill available space.

wireframe
stack gap=4 {
  text "Item 1"
  text "Item 2"
  text "Item 3"
}
AttributeTypeDescription
gapnumberGap between children
borderbooleanShow border
bgmuted | primary | secondaryBackground

relative

Absolute positioning overlay container. Children can use x and y attributes for precise placement.

wireframe
relative w=300 h=200 {
  image w=full h=full
  badge "New" x=10 y=10
}
AttributeTypeDescription
wnumberWidth
hnumberHeight

Container

Components for grouping content.

card

Card component. Groups and displays content. Supports Interactive Props.

wireframe
card title="Settings" shadow=md border {
  // content
}
AttributeTypeDescription
titlestringCard title
shadownone | sm | md | lg | xlShadow size
borderbooleanShow border
pnumberPadding

Modal dialog. Displays content over an overlay.

wireframe
modal "Confirm Delete" id="delete-modal" {
  text "Are you sure?"
  row justify=end gap=2 {
    button "Cancel" secondary
    button "Delete" danger
  }
}
AttributeTypeDescription
titlestringModal title
idstringUnique identifier for targeting with opens/toggles
w, hnumberWidth, height

drawer

Drawer panel. Slides in from the edge of the screen.

wireframe
drawer "Menu" id="side-menu" position=left {
  nav vertical { }
}
AttributeTypeDescription
titlestringDrawer title
idstringUnique identifier for targeting with opens/toggles
positionleft | right | top | bottomPosition

accordion

Accordion. Collapsible content panel.

wireframe
accordion "Advanced Settings" {
  // content
}
AttributeTypeDescription
titlestringAccordion title

Text

Components for displaying text.

text

Displays regular text.

wireframe
text "Regular text"
text "Muted description" muted
text "Important" weight=bold size=lg
text "Large heading" size=3xl align=justify
AttributeTypeDescription
sizexs | sm | base | md | lg | xl | 2xl | 3xlText size
weightnormal | medium | semibold | boldFont weight
alignleft | center | right | justifyText alignment
mutedbooleanMuted style

title

Title element. Displays h1~h6 headings.

wireframe
title "Main Title" level=1
title "Subtitle" level=2
title "Section" level=3
AttributeTypeDescription
level1-6Heading level
sizestringText size
alignstringText alignment

Displays a clickable hyperlink. Supports Interactive Props.

wireframe
link "Learn more" href="/docs"
link "GitHub" href="https://github.com" external
AttributeTypeDescription
hrefstringLink URL
externalbooleanExternal link (new tab)

Input

Components for user input.

input

Input field. Accepts text, email, password, etc.

wireframe
input "Email" inputType=email placeholder="Enter email"
input "Password" inputType=password
input "Name" required disabled
AttributeTypeDescription
labelstringLabel text
inputTypetext | email | password | number | tel | url | search | dateInput type
placeholderstringPlaceholder text
valuestringDefault value
disabledbooleanDisabled state
requiredbooleanRequired field
readonlybooleanRead-only
iconstringIcon
sizesm | md | lgInput size

textarea

Multi-line input field.

wireframe
textarea "Message" placeholder="Enter your message" rows=4
textarea "Bio" value="Hello world" required
AttributeTypeDescription
labelstringLabel text
placeholderstringPlaceholder text
valuestringDefault value
rowsnumberNumber of rows
disabledbooleanDisabled state
requiredbooleanRequired field

select

Dropdown select.

wireframe
select "Country" placeholder="Select country" options=["USA", "Canada", "UK"]
select "Status" options=["Active", "Inactive"] value="Active"
AttributeTypeDescription
labelstringLabel text
placeholderstringPlaceholder text
optionsarrayList of options
valuestringSelected value
disabledbooleanDisabled state
requiredbooleanRequired field

checkbox

Checkbox. Selects true/false value.

wireframe
checkbox "Remember me"
checkbox "I agree to terms" checked
AttributeTypeDescription
labelstringLabel text
checkedbooleanChecked state
disabledbooleanDisabled state

radio

Radio button. Selects one option within a group.

wireframe
radio "Option A" name="options"
radio "Option B" name="options" checked
AttributeTypeDescription
labelstringLabel text
namestringGroup name
checkedbooleanSelected state
disabledbooleanDisabled state

switch

Toggle switch. Toggles on/off state.

wireframe
switch "Dark mode"
switch "Notifications" checked
AttributeTypeDescription
labelstringLabel text
checkedbooleanActive state
disabledbooleanDisabled state

slider

Slider. Selects a value within a range.

wireframe
slider "Volume" min=0 max=100 value=50
AttributeTypeDescription
labelstringLabel text
minnumberMinimum value
maxnumberMaximum value
valuenumberCurrent value
stepnumberStep increment
disabledbooleanDisabled state

button

Button element. Displays a clickable button. Supports Interactive Props.

wireframe
button "Submit" primary
button "Cancel" secondary
button "Delete" danger outline
button "Loading..." primary loading
AttributeTypeDescription
primarybooleanPrimary emphasis style
secondarybooleanSecondary style
outlinebooleanOutline style
ghostbooleanGhost/transparent style
dangerbooleanDanger/delete style
sizexs | sm | md | lg | xlButton size
iconstringIcon
disabledbooleanDisabled state
loadingbooleanLoading state

Display

Components for displaying visual elements.

image

Displays an image. Supports Interactive Props.

wireframe
image src="/photo.jpg" alt="Photo" w=200 h=150
AttributeTypeDescription
srcstringImage source URL
altstringAlt text
wnumberWidth
hnumberHeight

placeholder

Placeholder for images or content.

wireframe
placeholder "Image" w=300 h=200
AttributeTypeDescription
labelstringLabel text
wnumberWidth
hnumberHeight

avatar

Displays a user profile image. Supports Interactive Props.

wireframe
avatar "John Doe"
avatar "JD" size=lg src
AttributeTypeDescription
namestringName (generates initials)
srcbooleanShow image
sizexs | sm | md | lg | xl | numberSize

badge

Displays status or count as a small label. Supports Interactive Props.

wireframe
badge "New"
badge "Active" variant=success
badge "3" variant=danger pill
badge "!" anchor=top-right
AttributeTypeDescription
variantdefault | primary | secondary | success | warning | danger | infoStyle variant
pillbooleanRounded corners
iconstringIcon
sizexs | sm | md | lgSize
anchortop-left | top-right | bottom-left | bottom-right | ...Anchor position in overlay container

icon

Displays an icon. Supports Interactive Props.

wireframe
icon "home"
icon "settings" size=lg muted
AttributeTypeDescription
namestringIcon name
sizexs | sm | md | lg | xl | numberSize
mutedbooleanMuted style

divider

Divider element. Visually separates content.

wireframe
divider
divider my=4
divider vertical
AttributeTypeDescription
verticalbooleanVertical direction
m, my, mxnumberMargin

Data

Components for displaying data.

table

Table component. Displays data in tabular format.

Concise syntax (array of arrays):

wireframe
table [["Name", "Email", "Role"], ["John", "john@example.com", "Admin"], ["Jane", "jane@example.com", "User"]]

Block syntax (columns + row):

wireframe
table striped hover bordered {
  columns ["Name", "Email", "Role"]
  row ["John", "john@example.com", "Admin"]
  row ["Jane", "jane@example.com", "User"]
}
AttributeTypeDescription
columnsarrayColumn headers
stripedbooleanStriped rows
borderedbooleanBordered style
hoverbooleanHover effect

list

List component. Displays items as a list.

Array syntax:

wireframe
list ["Apple", "Banana", "Cherry"]
list ["First", "Second", "Third"] ordered

Block syntax (supports nesting):

wireframe
list {
  item "Fruits" {
    item "Apple"
    item "Banana"
  }
  item "Vegetables" {
    item "Carrot"
    item "Potato"
  }
}
AttributeTypeDescription
orderedbooleanOrdered list
nonebooleanNo list style
gapnumberItem gap

Feedback

Components for providing feedback to users.

alert

Alert element. Displays a message to users.

wireframe
alert "Operation successful" variant=success
alert "Please check your input" variant=warning
alert "An error occurred" variant=danger dismissible
AttributeTypeDescription
variantsuccess | warning | danger | infoStyle variant
dismissiblebooleanCan be dismissed
iconstringIcon

toast

Toast notification. Displays a temporary message.

wireframe
toast "Saved!" position=top-right variant=success
AttributeTypeDescription
positiontop-left | top-center | top-right | bottom-left | bottom-center | bottom-rightPosition
variantsuccess | warning | danger | infoStyle variant

progress

Progress bar. Displays progress status.

wireframe
progress value=75
progress value=50 label="Uploading..."
progress indeterminate
AttributeTypeDescription
valuenumberProgress value (0-100)
maxnumberMaximum value
labelstringLabel text
indeterminatebooleanIndeterminate state

spinner

Loading spinner. Displays loading state.

wireframe
spinner
spinner size=lg label="Loading..."
AttributeTypeDescription
sizexs | sm | md | lg | xl | numberSize
labelstringLabel text

Overlay

Overlay UI components.

tooltip

Tooltip element. Displays additional info on hover.

wireframe
tooltip "Click to save" position=top {
  button "Save" primary
}
AttributeTypeDescription
contentstringTooltip content
positiontop | right | bottom | leftPosition

popover

Popover. Displays additional content on click.

wireframe
popover title="Options" {
  // content
}
AttributeTypeDescription
titlestringPopover title

Dropdown menu. Expands menu on click.

Array syntax:

wireframe
dropdown ["Edit", "Delete", "---", "Cancel"]

Use "---" to insert a divider between items.

Block syntax (supports icon, href, danger, disabled):

wireframe
dropdown {
  item "Edit" icon="edit"
  item "Duplicate" icon="copy"
  divider
  item "Delete" icon="trash" danger
}
AttributeTypeDescription
itemsarrayMenu items

Item attributes (block syntax):

AttributeTypeDescription
labelstringItem label
iconstringItem icon
hrefstringLink URL
dangerbooleanDanger style
disabledbooleanDisabled state

Navigation components.

Navigation area. Places menu items.

Array syntax:

wireframe
nav ["Home", "About", "Contact"]

Block syntax (supports groups, dividers, icons, active state):

wireframe
nav vertical {
  group "Main" {
    item "Dashboard" icon="home" active
    item "Settings" icon="settings"
  }
  divider
  group "Tools" {
    item "Analytics" icon="chart"
    item "Reports" icon="file"
  }
}
AttributeTypeDescription
verticalbooleanVertical direction
gapnumberItem gap
itemsarrayNav items (array syntax)

Item attributes (block syntax):

AttributeTypeDescription
labelstringItem label
iconstringItem icon
hrefstringLink URL
activebooleanActive state
disabledbooleanDisabled state

tabs

Tab component. Switches between multiple panels.

Array + block syntax:

wireframe
tabs ["General", "Security", "Notifications"] active=0 {
  tab "General" {
    text "General settings content"
  }
  tab "Security" {
    text "Security settings content"
  }
  tab "Notifications" {
    text "Notification preferences"
  }
}
AttributeTypeDescription
itemsarrayTab labels
activenumberActive tab index

Breadcrumb. Displays current location as a path.

Array syntax:

wireframe
breadcrumb ["Home", "Products", "Detail"]
AttributeTypeDescription
itemsarrayBreadcrumb items (string or {label, href})

Annotation

Components for documenting wireframes with numbered markers and explanatory panels.

marker

Numbered marker overlay. Place on UI elements for reference in annotation panels.

wireframe
marker 1
marker 2 color=blue
marker 3 anchor=top-right color=red
AttributeTypeDescription
colorblue | red | green | yellow | purple | orangeMarker color
anchortop-left | top-center | top-right | center-left | center | center-right | bottom-left | bottom-center | bottom-rightPosition within relative container

annotations

Annotation panel container. Contains item children with detailed descriptions.

wireframe
annotations title="Screen Description" {
  item 1 "Login Button" {
    text "OAuth integration planned"
  }
  item 2 "Password Field" {
    text "Minimum 8 characters required"
  }
}
AttributeTypeDescription
titlestringPanel title

item

Individual annotation entry. Used as a child of annotations with a marker number and title.

wireframe
item 1 "Button Description" {
  text "Detailed explanation here"
  text "Additional notes" muted
}

Released under the MIT License.