Skip to content
UI DSL Reference
AutoXXS (320px)XS (375px)SM (640px)MD (768px)LG (1024px)XL (1280px)XXL (1536px)
SketchMaterialiOSTamagui
DataInjectionKeyPatternsServiceTransactionProcessResearchProductQualityPerformanceSpecDomainFunctionTechnologyArchitectureConfigMiddlewareDataDatabaseDrizzleMigrationModelop-sqliteSchemaSQLState ManagementDraftKeystoneMergePatchPatchesPersistenceReactiveRedoStoreUndoTestingDeviceFactoryIsolationTypeScriptZodTopicsCommunicationBidsNVCDesignDesign ImplicationsEducationPedagogyFoundationsPsychologyAttachmentFloodingRelatingAuthentic RelatingUIEditorReact Native

UI DSL Reference

Fragment reference UI DSL Reference
tags
referenceuidslsurface

This reference provides an overview of all structural and interactive components available within the surface tag.

Component Index

The library is divided into semantic categories to help you structure your wireframes effectively. By default, components use the WebAwesome (wa) provider for high-fidelity interactive elements, falling back to StarSpec (wf) for layout primitives and unique components.

Layout

Structural components used to arrange elements in space.

Organizes children in a vertical column. Uses wa-stack under the hood β€” children stretch to fill the container width by default.

Attributes

AttributeTypeDefaultDescription
gapxs | sm | md | lg | xlmdSpacing between items.
alignstart | center | end | stretchstretchCross-axis alignment of children.

Organizes children in a horizontal line. Uses wa-cluster (default) or wa-split (justify="between").

Attributes

AttributeTypeDefaultDescription
gapxs | sm | md | lg | xlmdSpacing between items.
justifystart | center | end | betweenstartMain-axis distribution.
alignstart | center | end | baseline | stretchcenterCross-axis alignment.

Creates a multi-column grid layout. Uses wa-grid with a fixed grid-template-columns rule.

Attributes

AttributeTypeDefaultDescription
colsnumber1Number of equal-width columns.
gapxs | sm | md | lg | xlmdSpacing between cells.

A full-width page container with a dashed wireframe border. Use as the outermost shell of a screen.

Attributes

AttributeTypeDefaultDescription
titlestringβ€”Label shown in the top-left border notch.

Cards group related content in a visually bounded container.

Attributes

AttributeTypeDefaultDescription
elevatedbooleanfalseApply a drop shadow for visual lift (DSL shorthand).
orientationhorizontal | verticalverticalCard layout direction.
appearanceaccent | filled | outlined | filled-outlined | plainoutlinedVisual appearance.

Dividers are used to visually separate or group elements.

Usage

divider

Orientation

Use the orientation attribute to set the direction.

divider(orientation="vertical")

Attributes

NameTypeDefaultDescription
orientationhorizontal | verticalhorizontalDivider orientation.

Scrollers create an accessible container while providing visual cues (fading shadows) that help users identify and navigate through content that scrolls.

Usage

scroller
row(gap="sm")
card Item 1
card Item 2

Attributes

NameTypeDefaultDescription
orientationhorizontal | verticalhorizontalScroll direction.
without-shadowbooleanfalseRemoves the fading edge shadows.
without-scrollbarbooleanfalseHides the scrollbar while keeping scroll functionality.

Vertical scrolling: Set style="max-height: Xpx" on the scroller to constrain its height and enable vertical overflow.

Buttons

Action triggers and button variants.

Buttons represent actions available to the user.

Attributes

NameTypeDefaultDescription
variantneutral | brand | success | warning | dangerneutralSemantic variant.
sizesmall | medium | largemediumButton size.
appearanceaccent | filled | outlined | plainaccentVisual appearance.
iconstring-Icon name placed in the start slot.
pillbooleanfalseRounded pill shape.
loadingbooleanfalseLoading state.
disabledbooleanfalseDisables the button.
with-caretbooleanfalseAdds a dropdown caret indicator.
widthfull | autoautoButton width (DSL shorthand).

Button groups are used to group related buttons into sections.

Usage

button-group(label="Actions")
button Left
button Center
button Right

Orientation

Use the orientation attribute to create a vertical group.

button-group(label="Options" orientation="vertical")
button Button A
button Button B

Attributes

NameTypeDefaultDescription
labelstring-Accessible label.
orientationhorizontal | verticalhorizontalGroup orientation.

Floating Action Button (FAB) fixed to a corner of the screen.

Attributes

AttributeTypeDefaultDescription
iconstring-Icon name.
positiontop-left | top-right | bottom-left | bottom-rightbottom-rightFixed corner position.
variantprimary | secondary | dangerprimaryVisual style.
floatbutton(icon="plus")
floatbutton(icon="edit" position="bottom-left" variant="secondary")

Display

Components for presenting text, media, and status information.

Visual hierarchy markers.

Attributes

AttributeTypeDefaultDescription
level1 | 2 | 31Font size and emphasis level.
heading(level="1") Page Title
heading(level="2") Section Header
heading(level="3") Subsection

Body copy and descriptive text.

Attributes

AttributeTypeDefaultDescription
sizesm | md | lgmdFont size.
mutedbooleanfalseApply a lighter color.
colormuted-Alias for muted=true.
weightbold-Bold weight.
text Regular body copy.
text(size="sm" color="muted") Supporting caption text.
text(weight="bold") Bold label

Badges are used to draw attention and display statuses or counts.

Usage

badge Badge

Variants

Set the variant attribute to change the badge’s theme.

badge(variant="brand") Brand
badge(variant="success") Success
badge(variant="warning") Warning
badge(variant="danger") Danger

Appearance

Use the appearance attribute to change the badge’s visual appearance.

badge(appearance="filled" variant="neutral") Filled
badge(appearance="outlined" variant="neutral") Outlined

Pill Badges

Use the pill attribute to give badges rounded edges.

badge(variant="brand" pill) Brand

Start & End Decorations

Use the icon attribute to add presentational elements alongside the badge’s label.

badge(icon="acorn") Start

Attributes

NameTypeDefaultDescription
variantbrand | neutral | success | warning | dangerbrandThe badge’s theme variant.
appearanceaccent | filled | outlined | filled-outlinedaccentThe badge’s visual appearance.
pillbooleanfalseDraws a pill-style badge with rounded edges.
attentionnone | pulse | bouncenoneAdds an animation to draw attention.

Contextual feedback messages.

Attributes

AttributeTypeDefaultDescription
variantinfo | success | warning | errorinfoVisual style.
titlestring-Bold header text.
messagestring-Secondary descriptive text.

Callouts are used to display important messages inline.

Usage

callout This is a standard callout.

Variants

Set the variant attribute to change the callout’s semantic intent.

callout(variant="brand") Informative callout
callout(variant="success") Success message
callout(variant="danger") Danger/error message

Sizes

Use the size attribute to change a callout’s size.

callout(size="small") Small tip
callout(size="medium") Standard callout
callout(size="large") Important message

Icons

Add an icon using the icon attribute, which maps to the icon slot.

callout(icon="circle-info") Information available

Attributes

NameTypeDefaultDescription
variantbrand | neutral | success | warning | dangerbrandThe callout’s theme variant.
sizesmall | medium | largemediumThe callout’s size.
appearanceaccent | filled | outlined | plain | filled-outlinedfilled-outlinedVisual appearance.

Icons are symbols representing options or states.

Usage

Basic icon by name
puguiicon wa-icon-basic
icon(name="gear")

Sizes

Icons scale with font-size. Set style="font-size: 2em" on the icon or a parent element β€” there is no size attribute.

Icon sizing via font-size style
puguiicon wa-icon-sizes
row(gap="md" align="center")
icon(name="gear" style="font-size:1em")
icon(name="gear" style="font-size:1.5em")
icon(name="gear" style="font-size:2em")
icon(name="gear" style="font-size:3em")

Variants

Icon stroke-weight variants
puguiicon wa-icon-variants
row(gap="md" align="center")
icon(name="star" variant="solid" style="font-size:1.5em")
icon(name="star" variant="regular" style="font-size:1.5em")
icon(name="star" variant="light" style="font-size:1.5em")
icon(name="star" variant="thin" style="font-size:1.5em")

Colors

Icons inherit currentColor. Use style="color: var(--wa-color-{hue}-{tint})" where tint is a 2-digit value on the 05–95 scale (e.g. --wa-color-green-60).

Icon semantic color usage
puguiicon wa-icon-colors
row(gap="md" align="center")
icon(name="circle-check" variant="solid" style="font-size:1.5em;color:var(--wa-color-green-60)")
icon(name="triangle-exclamation" variant="solid" style="font-size:1.5em;color:var(--wa-color-yellow-50)")
icon(name="circle-xmark" variant="solid" style="font-size:1.5em;color:var(--wa-color-red-60)")
icon(name="circle-info" variant="solid" style="font-size:1.5em;color:var(--wa-color-blue-60)")

Attributes

NameTypeDefaultDescription
namestring-Icon name.
labelstring-Accessible description.
variantsolid | regular | light | thinregularIcon variant.
rotatenumber0Rotation in degrees.
flipx | y | both-Flip direction.

Avatars represent a person or object.

Usage

avatar(label="User")

Content

Avatars support images, initials, or icons.

avatar(image="/images/user.jpg" label="User Photo")
avatar(initials="JD" label="John Doe")
avatar(label="Empty")
icon(slot="icon" name="person")

Attributes

NameTypeDefaultDescription
imagestring-Image source URL.
initialsstring-Fallback initials.
labelstring-Accessible description.
shapecircle | square | roundedcircleAvatar shape.
loadingeager | lazyeagerImage loading strategy.

Tags are used as labels to organize things or to indicate a selection.

Usage

tag Brand

Variants

Set the variant attribute to change the tag’s theme.

tag(variant="brand") Brand
tag(variant="success") Success
tag(variant="danger") Danger

Sizes

Use the size attribute to change a tag’s size.

tag(size="small") Small
tag(size="medium") Medium
tag(size="large") Large

Attributes

NameTypeDefaultDescription
variantbrand | neutral | success | warning | dangerneutralThe tag’s theme variant.
sizesmall | medium | largemediumThe tag’s size.
appearanceaccent | filled | outlined | filled-outlinedfilled-outlinedVisual appearance.
pillbooleanfalseDraws a pill-style tag with rounded edges.
with-removebooleanfalseShows a remove button.

Spinners show the progress of an indeterminate operation.

Usage

spinner

Attributes

NameTypeDefaultDescription
---None.

Conversational message layout.

Attributes

AttributeTypeDefaultDescription
variantsent | receivedreceivedMessage ownership and alignment.
timestampstring-Small time text (e.g. 10:42 AM).
statussent | delivered | read-Message status indicator.

Animated conversational activity indicator. Use inside or after a chat-bubble to show that the other party is composing a reply.

stack(gap="sm")
chat-bubble(variant="received")
text One moment…
typing-dots

Provides a declarative way to create animations for web components.

Usage

animation(name="fade-in" duration=500 play=true)
div Content to animate

Attributes

NameTypeDefaultDescription
namestring-Animation name.
durationnumber1000Duration in ms.
playbooleantrueAnimation play state.

Displays an animated image (e.g., GIF) that can be paused and played.

Usage

animated-image(src="image.gif" alt="Animated GIF")

Attributes

NameTypeDefaultDescription
srcstring-Image URL.
altstring-Alt text.
playbooleantrueAnimation state.

Forms & Input

Interactive elements for gathering user data.

Inputs collect data from the user.

Usage

Basic input with label
puguiinput wa-input-basic
input(label="Name")

Types

The type attribute controls the type of input the browser renders.

Input type variants
puguiinput wa-input-types
input(label="Email" type="email")
input(label="Date" type="date")

Options

Add interactive features with shorthand attributes.

Input with clear button and password toggle
puguiinput wa-input-options
input(label="Nickname" placeholder="What should we call you?" with-clear)
input(label="Password" type="password" password-toggle)

Sizes

Use the size attribute to change an input’s size.

Input size scale
puguiinput wa-input-sizes
input(label="Small" size="small")
input(label="Medium" size="medium")
input(label="Large" size="large")

Attributes

NameTypeDefaultDescription
labelstring-The input label.
placeholderstring-Placeholder text.
typetext | email | number | password | datetextInput type.
sizesmall | medium | largemediumInput size.
disabledbooleanfalsePrevents interaction.
requiredbooleanfalseMarks as required.
with-clearbooleanfalseShows a clear button.
password-togglebooleanfalseShows a toggle button for password visibility.

Textareas collect data from the user and allow multiple lines of text.

Usage

textarea(label="Comments")

Options

Add interactive features with shorthand attributes.

textarea(label="Feedback" placeholder="What do you think?" with-count)

Attributes

NameTypeDefaultDescription
labelstring-The textarea label.
placeholderstring-Placeholder text.
rowsnumber4Number of rows.
resizenone | vertical | horizontal | both | autoverticalResizing behavior.
sizesmall | medium | largemediumTextarea size.
disabledbooleanfalsePrevents interaction.
requiredbooleanfalseMarks as required.
with-countbooleanfalseShows a character count.

Dropdown selection menu.

Attributes

AttributeTypeDefaultDescription
optionsstring-Comma-separated list of options.
openbooleanfalseWhether the dropdown is visible.
labelstring-Label text.
valuestring-Selected value.
placeholderstringSelect...Hint text when no value is selected.
adaptivebooleanfalseRenders as a bottom sheet (mobile-optimized).
searchablebooleanfalseAdds a search input to the option list.
disabledbooleanfalsePrevents interaction.
statussuccess | error-Visual validation state.
messagestring-Validation message.

Checkboxes allow the user to toggle an option on or off.

Usage

checkbox Label text

States

Control the state using boolean attributes.

checkbox(checked) Checked
checkbox(indeterminate) Indeterminate
checkbox(disabled) Disabled

Sizes

Use the size attribute to change a checkbox’s size.

checkbox(size="small") Small
checkbox(size="medium") Medium
checkbox(size="large") Large

Attributes

NameTypeDefaultDescription
checkedbooleanfalseDrawn in a checked state.
indeterminatebooleanfalseDrawn in an indeterminate state.
disabledbooleanfalsePrevents interaction.
sizesmall | medium | largemediumCheckbox size.
requiredbooleanfalseMarks as required.

Radios allow the user to select a single option from a group. They must be used inside a radio-group.

Usage

radio(value="1") Option 1

Attributes

NameTypeDefaultDescription
valuestring-Value submitted when selected.
disabledbooleanfalsePrevents interaction.
sizesmall | medium | largemediumRadio size.

Radio groups are used to group multiple radios so they function as a single form control.

Usage

radio-group(label="Select an option" name="options" value="A")
radio(value="A") Option A
radio(value="B") Option B

Orientation

Use orientation to switch between horizontal and vertical layouts.

radio-group(orientation="horizontal")
radio(value="A") A
radio(value="B") B

Attributes

NameTypeDefaultDescription
labelstring-Accessible label.
namestring-Name attribute for form submission.
valuestring-Currently selected value.
orientationhorizontal | verticalverticalLayout direction.
sizesmall | medium | largemediumSize for all contained radios.
requiredbooleanfalseMarks as required.

Ranges allow the user to select a value within a range.

Usage

slider(label="Volume" min=0 max=100 value=50)

Features

Enable range mode or show additional UI elements.

slider(label="Range" range min=0 max=100 min-value=20 max-value=80)
slider(label="Markers" with-markers min=0 max=10 value=5)

Tooltips

Use with-tooltip to show the current value.

slider(label="Quality" with-tooltip min=0 max=100 value=50)

Attributes

NameTypeDefaultDescription
labelstring-Accessible label.
minnumber0Minimum value.
maxnumber100Maximum value.
valuenumber-Current value.
rangebooleanfalseEnables dual-thumb range selection.
min-valuenumber0Minimum value for range mode.
max-valuenumber50Maximum value for range mode.
with-tooltipbooleanfalseShows a value tooltip.
with-markersbooleanfalseShows step markers.
sizesmall | medium | largemediumComponent size.
disabledbooleanfalsePrevents interaction.

Color pickers allow the user to select a color.

Usage

color-picker(label="Select a color")

Formats

Use the format attribute to control the color format.

color-picker(label="Hex" format="hex")
color-picker(label="RGB" format="rgb")

Features

Enable features like opacity and swatches.

color-picker(label="With opacity" opacity)
color-picker(label="With swatches" swatches="#f00; #0f0; #00f")

Attributes

NameTypeDefaultDescription
labelstring-Accessible label.
formathex | rgb | hsl | hsvhexOutput color format.
opacitybooleanfalseEnables opacity slider.
swatchesstring-Semicolon-separated color swatches.
sizesmall | medium | largemediumComponent size.
disabledbooleanfalsePrevents interaction.

Toggles an option on or off.

Usage

switch(checked) Label

Attributes

NameTypeDefaultDescription
checkedbooleanfalseCurrent state.
disabledbooleanfalsePrevents interaction.

Ratings give users a way to quickly view and provide feedback. Integrates with standard form elements.

Usage

rating(label="Rate this" value=3)

Labels

Always provide a label for assistive devices β€” it is not displayed visually but is required for accessibility.

rating(label="Rate this component")

Maximum Value

Use max to change the highest rating. Default is 5.

rating(label="Rating" max=3)
rating(label="Rating" max=10)

Precision

Use precision to allow fractional ratings.

rating(label="Rating" precision=0.5 value=2.5)

Sizing

Use size to adjust the component size.

rating(label="Rating" size="small")
rating(label="Rating" size="medium")
rating(label="Rating" size="large")

Readonly

Use readonly to display a rating that users cannot change.

rating(label="Rating" readonly value=4)

Disabled

Use disabled to prevent all interaction.

rating(label="Rating" disabled value=3)

Attributes

NameTypeDefaultDescription
labelstring''Accessible label for assistive devices (not displayed visually).
valuenumber0The current rating value.
maxnumber5The highest rating to show.
precisionnumber1Increment precision. Use 0.5 for half-star ratings.
size'small' | 'medium' | 'large''medium'The component’s size.
readonlybooleanfalsePrevents user interaction without disabling the element.
disabledbooleanfalseDisables the rating entirely.
requiredbooleanfalseMakes the rating required in a form context.
namestringnullForm field name submitted with form data.

Specialized multi-box input for verification codes.

Attributes

AttributeTypeDefaultDescription
lengthnumber4Number of digit boxes.
securebooleanfalseRenders bullets instead of clear text.
labelstring-Label text.
messagestring-Validation or hint message.

Calendar date selection.

Attributes

AttributeTypeDefaultDescription
labelstring-Label text.
valuestring-Current date value (ISO format).
disabledbooleanfalsePrevents interaction.
A row of mutually exclusive buttons (segmented control).

Attributes

AttributeTypeDefaultDescription
optionsstring-Shorthand for comma-separated labels.
valuestring-Selected value in shorthand mode.

Can also contain segment children for icon support:

segmented
segment(label="Left" icon="align-left" active=true)
segment(label="Center" icon="align-center")
segment(label="Right" icon="align-right")

Components for organizing multi-screen or multi-state interfaces.

Application navigation shell. Supports top bar, sidebar, and breadcrumb modes. Contains link children.

Attributes

AttributeTypeDefaultDescription
typetop | side | breadcrumbtopNavigation layout.
brandstring-Brand/app name (top bar only).
searchbooleanfalseShow a search input (top bar only).

Switches between mutually exclusive content panels. Contains tab children; the child marked active is rendered.

Tab attributes

AttributeTypeDefaultDescription
labelstring-Text on the tab header.
iconstring-Icon on the tab header.
activebooleanfalseWhether this tab is selected.
tabs
tab(label="Overview" active=true)
text Overview content here.
tab(label="Settings")
text Settings content here.
tab(label="History" icon="clock")
text History content here.

Tab groups (tabs) organize content into distinct views. Each tab is a header and its content body in one β€” no separate tab-panel needed in the DSL.

Usage

Basic tab group with three tabs
puguitab-group wa-tabs-basic
tabs(label="Settings")
tab(label="General") General content.
tab(label="Privacy") Privacy content.
tab(label="Advanced") Advanced content.

Vertical placement

Tab group with vertical side placement
puguitab-group wa-tabs-vertical
tabs(label="Navigation" placement="start")
tab(label="Overview") Overview content.
tab(label="Details") Details content.
tab(label="History") History content.

Disabled tab

Tab group with a disabled tab
puguitab-group wa-tabs-disabled
tabs(label="Example")
tab(label="Active") Active tab content.
tab(label="Another") Another tab content.
tab(label="Disabled" disabled) This tab is disabled.

Attributes β€” tabs (tab-group)

NameTypeDefaultDescription
labelstring-Accessible label for the group.
placementtop | bottom | start | endtopTab strip position.
activationauto | manualautoauto activates on focus; manual requires a click.
no-scroll-controlsbooleanfalseHides scroll arrows when tabs overflow.

Attributes β€” tab

NameTypeDefaultDescription
labelstring-Tab header text.
disabledbooleanfalseDisables the tab.

Collapsible content panels. The DSL alias panel maps to wa-details.

Attributes

AttributeTypeDefaultDescription
labelstring-Header text (DSL). Maps to summary in wa-details.
summarystring-Header text (wa-details).
openbooleanfalseWhether the panel is expanded.
disabledbooleanfalsePrevents toggling.
icon-placementstart | endendToggle icon position.
appearancefilled | outlined | filled-outlined | plainoutlinedVisual appearance.

A linear sequence of steps. Contains step children.

Stepper attributes

AttributeTypeDefaultDescription
orientationhorizontal | verticalhorizontalLayout direction.

Step attributes

AttributeTypeDefaultDescription
labelstring-Step title.
descriptionstring-Optional subtitle.
statuspending | active | completedpendingCurrent state.

Breadcrumbs show the current location in a hierarchy. Each breadcrumb-item is a navigation step; the last one represents the current page and is rendered without a link.

Usage

breadcrumb
breadcrumb-item(href="/home") Home
breadcrumb-item(href="/products") Products
breadcrumb-item Current Page

Attributes β€” breadcrumb

NameTypeDefaultDescription
labelstringBreadcrumbAccessible aria-label for the nav element.

Attributes β€” breadcrumb-item

NameTypeDefaultDescription
hrefstring-Makes the item a link. Omit for the current/last item.
targetstring-Link target (e.g. _blank).
relstring-Link relationship.

Slots β€” breadcrumb-item

SlotDescription
startIcon or element before the label.
endIcon or element after the label.

Slots β€” breadcrumb

SlotDescription
separatorCustom separator between items (default is /).

Command menus or context menus. Contains menu-item children.

Attributes

AttributeTypeDefaultDescription
labelstring-Trigger button text.
openbooleantrueWhether the menu is visible.
variantdropdown | listdropdownInline list or absolute dropdown.
menu(label="Actions" open=true)
menu-item Edit
menu-item Duplicate
menu-item(danger=true) Delete

Dropdowns display a list of options that can be triggered by a button or other element.

Usage

Basic dropdown with trigger button and items
puguidropdown wa-dropdown-basic
dropdown
button(slot="trigger" with-caret) Options
dropdown-item(value="1") Option 1
dropdown-item(value="2") Option 2

Item variants

Dropdown with checkbox and danger item variants
puguidropdown wa-dropdown-item-variants
dropdown
button(slot="trigger" with-caret) Actions
dropdown-item(value="edit") Edit
dropdown-item(value="dupe") Duplicate
dropdown-item(type="checkbox" checked value="pin") Pinned
dropdown-item(value="delete" variant="danger") Delete

Attributes

NameTypeDefaultDescription
openbooleanfalseVisibility state.
sizesmall | medium | largemediumComponent size.
placementtop | bottom | left | rightbottom-startPopup positioning.

Represents an individual item within a dropdown menu. Must be used as a child of a dropdown.

Usage

dropdown-item(value="1") Option 1

Attributes

NameTypeDefaultDescription
valuestring-Value identifier.
typenormal | checkboxnormalItem type.
checkedbooleanfalseIf checked (for checkbox type).
disabledbooleanfalsePrevents interaction.
variantdefault | dangerdefaultItem variant.

Interruptive overlay dialog. The DSL alias modal maps to wa-dialog.

Note: The modal component is temporarily disabled in wireframe previews to avoid interfering with the documentation interface. Use modal=false to render inline for wireframes.

Attributes

AttributeTypeDefaultDescription
titlestring-Header title.
openbooleantrueVisibility state.
sizesm | md | lgmdDialog width (DSL).
variantalert-Visual intent (e.g. destructive warning).
nativebooleanfalseRenders a system-native alert style.
modalbooleantrueIf false, renders as an inline sheet (wireframe mode).
without-headerbooleanfalseHides the header.
light-dismissbooleanfalseCloses on clicking outside.

Drawers slide in from a container to expose additional options and information.

Usage

drawer(label="Drawer Title")
text Content goes here

Placement

Use the placement attribute to control where the drawer slides from.

drawer(label="Drawer" placement="start")

Attributes

NameTypeDefaultDescription
labelstring-Header title.
openbooleantrueVisibility state.
placementstart | end | top | bottomendSlide-in direction.
without-headerbooleanfalseHides the header.
light-dismissbooleantrueCloses on clicking outside.

Trees display a hierarchical list of selectable items. Items with children can be expanded and collapsed. The icon shorthand on tree-item prepends a wa-icon before the label text.

Usage

Collapsible tree with nested items
puguitree wa-tree-basic
tree
tree-item(expanded) Documents
tree-item Reports
tree-item Archive
tree-item Downloads

Attributes β€” tree

NameTypeDefaultDescription
selectionsingle | multiple | leafsingleSelection behaviour. multiple shows checkboxes. leaf restricts selection to leaf nodes only.

Attributes β€” tree-item

NameTypeDefaultDescription
expandedbooleanfalseExpand state on initial render.
selectedbooleanfalseMark item as selected.
lazybooleanfalseMarks the item as not yet loaded; emits wa-lazy-load on first expand.

CSS Custom Properties β€” tree

NameDefaultDescription
--indent-guide-width0Width of the indent guide line. Set to 1px to show guides.
--indent-guide-colorsurface borderColor of the indent guide.
--indent-guide-stylesolidLine style: solid, dashed, dotted.
--indent-sizevar(--wa-space-m)Indentation depth per level.

Text content: tree-item uses inline text, not a label attribute. Write tree-item(expanded) Folder Name β€” not tree-item(label="Folder Name").

Navigation link. Used inside nav, breadcrumb mode, and as standalone inline links.

Attributes

AttributeTypeDefaultDescription
labelstring-Link text.
iconstring-Icon name.
activebooleanfalseMarks the current/active route.
countnumber-Badge count shown alongside the label.
hrefstring-URL destination.
link(label="Dashboard" icon="home" active=true)
link(label="Notifications" count=5)

Data

Components for presenting structured data, metrics, and progress.

Dashboard metric cards with trend indicators.

Attributes

AttributeTypeDefaultDescription
labelstring-Metric name (e.g. Revenue).
valuestring-Primary numeric value.
trendstring-Secondary trend text (e.g. +12%).
directionup | down-Visual direction for the trend color.

Tabular data display. Contains column children.

Table attributes

AttributeTypeDefaultDescription
rowsnumber3Number of placeholder rows.
stripedbooleanfalseAlternate row background colors.

Column attributes

AttributeTypeDefaultDescription
labelstring-Header text.
widthstringautoCSS width (e.g. 20%).
alignleft | center | rightleftText alignment.
table(rows=4 striped=true)
column(label="Name" width="40%")
column(label="Status" width="20%" align="center")
column(label="Date" width="20%")
column(label="Amount" width="20%" align="right")

Simple vertical collection.

Attributes

AttributeTypeDefaultDescription
typebullet | ordered | nonebulletMarker style.
countnumber3Number of placeholder items.
itemstringitemLabel shown in each placeholder item.
list(type="bullet" count=4 item="Feature")
list(type="ordered" count=3 item="Step")

A vertical chronological sequence of events. Contains timeline-item children.

timeline-item attributes

AttributeTypeDefaultDescription
labelstring-Primary event text.
descriptionstring-Secondary details or timestamp.
iconstring-Marker icon name.
statuspending | active | completedcompletedState of the event.

Visual completion indicators. Two variants: progress-bar (linear) and progress-ring (circular).


progress-bar

Linear progress indicator. Shows the status of an ongoing operation.

Attributes

NameTypeDefaultDescription
valuenumber0Current progress percentage (0–100).
indeterminatebooleanfalseSets indeterminate state when progress cannot be determined.
labelstring-Accessible label.

progress-ring

Circular progress indicator.

Attributes

NameTypeDefaultDescription
valuenumber0Current progress percentage (0–100).
sizenumber-Size in pixels.

progress (DSL)

DSL alias for generic visual completion state.

AttributeTypeDefaultDescription
labelstring-Descriptive text.
valuenumber0Current progress.
maxnumber100Target value.
Generates a QR code rendered using the Canvas API.

Attributes

NameTypeDefaultDescription
valuestring-Data to encode.
sizenumber | sm | md | lg128Size in pixels (or DSL size token).
labelstring-Accessible description.
radiusnumber0Edge radius (0 to 0.5).
error-correctionL | M | Q | HHError correction level.

Three formatting components backed by browser-native Intl APIs β€” no language packs required.

  • format-number β€” decimals, percentages, currencies via Intl.NumberFormat
  • format-date β€” dates, times, weekdays via Intl.DateTimeFormat
  • format-bytes β€” byte/bit sizes with configurable verbosity

Attributes β€” format-number

NameTypeDefaultDescription
valuenumber0Number to format.
typedecimal | currency | percentdecimalFormatting style.
currencystringUSDISO 4217 currency code. Used when type="currency".
currency-displaysymbol | narrowSymbol | code | namesymbolHow to display the currency.
minimum-fraction-digitsnumber-Minimum decimal places (0–100).
maximum-fraction-digitsnumber-Maximum decimal places (0–100).
without-groupingbooleanfalseDisables thousands separator.
langstringbrowser defaultBCP 47 locale tag (e.g. en-US, de).

Attributes β€” format-date

NameTypeDefaultDescription
datestring | Datenew Date()ISO 8601 date string to format.
weekdaynarrow | short | long-Display format for the weekday.
yearnumeric | 2-digit-Display format for the year.
monthnumeric | 2-digit | narrow | short | long-Display format for the month.
daynumeric | 2-digit-Display format for the day.
hournumeric | 2-digit-Display format for the hour.
minutenumeric | 2-digit-Display format for the minute.
secondnumeric | 2-digit-Display format for the second.
hour-formatauto | 12 | 24auto12- or 24-hour clock.
time-zonestring-IANA time zone name (e.g. America/New_York).
langstringbrowser defaultBCP 47 locale tag (e.g. en-US, fr).

Attributes β€” format-bytes

NameTypeDefaultDescription
valuenumber0Value to format.
unitbyte | bitbyteDisplay as bytes or bits.
displaylong | short | narrowshortLabel verbosity: β€œ100 bytes”, β€œ100 B”, β€œ100B”.
langstringbrowser defaultBCP 47 locale tag for number formatting.

Always use ISO 8601 for dates. Avoid 03/04/2026 β€” browsers may interpret month/day order differently.

Numeric formatting with decimal, percent, and currency
puguiformat wa-format-number
format-number(value=12345.67)
format-number(value=0.753 type="percent")
format-number(value=2000 type="currency" currency="USD" lang="en-US")
Date formatting with long month, weekday, and time
puguiformat wa-format-date
format-date(date="2026-04-30T12:00:00Z" month="long" day="numeric" year="numeric")
format-date(date="2026-04-30T12:00:00Z" weekday="long")
format-date(date="2026-04-30T14:30:00Z" hour="numeric" minute="numeric" hour-format="12")
Byte size formatting with display verbosity variants
puguiformat wa-format-bytes
format-bytes(value=512)
format-bytes(value=1572864 display="long")
format-bytes(value=1572864 display="short")
format-bytes(value=1572864 display="narrow")

Outputs a localized time phrase relative to the current date and time. Localization is handled by the browser’s Intl.RelativeTimeFormat API β€” no language packs required.

Usage

relative-time(date="2026-04-29T10:00:00Z")

Attributes

NameTypeDefaultDescription
datestring | Datenew Date()ISO 8601 date string to calculate from.
formatlong | short | narrowlongDisplay style.
numericauto | alwaysautoauto shows β€œyesterday”; always shows β€œ1 day ago”.
langstringbrowser defaultBCP 47 language tag (e.g. en-US, de, zh-CN).
syncbooleanfalseAuto-updates as time passes.

Dates must be ISO 8601. Avoid ambiguous formats like 03/04/2026 β€” always use YYYY-MM-DDTHH:MM:SSZ.

Charts

Data visualization components.

Visual data representations.

Attributes

AttributeTypeDefaultDescription
typeradial | area | barareaChart visualization pattern.
valuenumber50Percentage value (for radial type).
labelstring-Descriptive legend text.

Widgets

Interactive content widgets.

Carousels display content slides along a horizontal or vertical axis.

Usage

carousel
carousel-item Slide 1
carousel-item Slide 2

Features

Enable navigation and pagination.

carousel(navigation pagination loop)
carousel-item Slide 1
carousel-item Slide 2

Attributes

NameTypeDefaultDescription
navigationbooleanfalseShows nav arrows.
paginationbooleanfalseShows dots.
loopbooleanfalseEnable infinite loop.
autoplaybooleanfalseAuto-advance slides.
orientationhorizontal | verticalhorizontalAxis of movement.

Must be used inside a carousel.

Usage

carousel-item This is a slide.

Compares two content regions side-by-side with a draggable divider. Works best when both sides share the same dimensions. The handle can be dragged or controlled with arrow keys (Shift+arrows for larger steps, Home/End to jump to edges).

Usage

comparison
img(slot="before" src="before.jpg" alt="Before")
img(slot="after" src="after.jpg" alt="After")

Attributes

NameTypeDefaultDescription
positionnumber50Initial divider position as a percentage (0–100).

CSS Custom Properties

NameDescription
--divider-widthWidth of the dividing line.
--handle-sizeSize of the drag handle.

Allows zooming into content within a container.

Usage

Zoomable frame with min/max zoom bounds
puguizoomable-frame wa-zoomable-frame-basic
zoomable-frame(min-zoom=0.5 max-zoom=3 src="/showroom")

Attributes

NameTypeDefaultDescription
min-zoomnumber0.1Minimum zoom level.
max-zoomnumber5Maximum zoom level.

Placeholder & Skeleton

Generic placeholders and loading states.

Generic content placeholders for wireframe layouts. Renders a visually distinct blocked area to represent content not yet designed.

Attributes

AttributeTypeDefaultDescription
typetext | image | chart | avatar | video | cardtextVisual pattern.
skeletonbooleanfalseApply animated loading skeleton state.
widthstring-CSS width (e.g. 100%).
heightstring-CSS height (e.g. 200px).
ratiostring-CSS aspect-ratio (e.g. 16/9).
linesnumber1Number of text lines (text type only).
labelstring-Label text.
placeholder(type="image" ratio="16/9" label="Hero Banner")
placeholder(type="chart" height="200px")
placeholder(type="avatar" width="48px" height="48px")

skeleton renders a visual standin for content that is loading or not yet designed. placeholder is an alias β€” both render as wa-skeleton.

Use placeholder in wireframes for deferred visual areas. Use skeleton when explicitly modelling a loading state.

Attributes

AttributeTypeDefaultDescription
effectnone | pulse | sheennoneAnimation effect. sheen is a left-to-right sweep; pulse fades in and out.
stylestringβ€”Inline CSS for sizing and border-radius.

Sizing: wa-skeleton is a block element that stretches to fill its container by default. Control dimensions with the style attribute.

Shape: Use style="border-radius: 50%" for circular variants. Use style="border-radius: var(--wa-border-radius-m)" for rounded.

Color: Override fill and sweep color via --color and --sheen-color CSS custom properties.

Common patterns

Text block

stack(gap="xs")
skeleton(effect="sheen")
skeleton(effect="sheen")
skeleton(effect="sheen" style="width: 65%")

Avatar (circle)

skeleton(style="width: 48px; height: 48px; border-radius: 50%")

Avatar + text row

row(align="center" gap="md")
skeleton(style="width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0")
stack(gap="xs" style="flex: 1")
skeleton(effect="sheen")
skeleton(effect="sheen" style="width: 50%")

Image / media box

skeleton(effect="sheen" style="height: 180px")

Card skeleton

card
stack(gap="sm")
skeleton(effect="sheen" style="height: 120px")
skeleton(effect="sheen")
skeleton(effect="sheen" style="width: 70%")
row(gap="sm")
skeleton(effect="sheen" style="width: 80px; height: 32px")
skeleton(effect="sheen" style="width: 80px; height: 32px")

Table rows

stack(gap="xs")
skeleton(style="height: 36px")
skeleton(effect="pulse")
skeleton(effect="pulse")
skeleton(effect="pulse")

Patterns

Common multi-component screen layout patterns.

Full screen shell with a header row (title + icon), a primary card, and a secondary card.

Form screen shell with a title block, an elevated card containing inputs, and a submit button.

List screen shell with a header row, search input, and a stack of card list items.

Settings screen shell with a heading, an elevated preferences card containing divider-separated control rows.


Layout Strategy

When building a surface, follow these hierarchical levels:

  1. Shell: Use nav (top/side) to define the application frame.
  2. Sectioning: Use section (wf) to group related cards or stacks.
  3. Grouping: Use card (wa) to encapsulate related inputs or data.
  4. Flow: Use stack (wf, vertical) and row (wf, horizontal) to manage spacing and alignment of atomic components.

For more details on styling and theming, see Wireframe CSS.