WireScript
Components

define

Create reusable components with parameters.

Define reusable components with parameters that can be used throughout your wireframes.

Usage

(define component-name (param1 param2)
  (box :row
    (text $param1)
    (text $param2)))

Calling Components

Always use named arguments:

(component-name :param1 "Hello" :param2 "World")

Rules

  1. Parameters are referenced with $param in the body
  2. Calls must use named arguments (:param value)
  3. Component names cannot shadow built-in elements

Examples

Stat Card

User Card

Feature Card

List Item

Metric Card

Action Card

On this page