Skip to content

The Open Standard for Generative UI

18.4 KB
Raw Blame
{
  "component": {
    "component": "Stack",
    "props": {
      "children": [
        {
          "component": "Card",
          "props": {
            "children": [
              {
                "component": "TextContent",
                "props": {
                  "text": "Product Details",
                  "size": "large-heavy"
                }
              }
            ],
            "variant": "clear"
          }
        },
        {
          "component": "Stack",
          "props": {
            "children": [
              {
                "component": "Stack",
                "props": {
                  "children": [
                    {
                      "component": "Card",
                      "props": {
                        "children": [
                          {
                            "component": "CardHeader",
                            "props": {
                              "title": "AeroStride Runner Sneakers",
                              "subtitle": "Lightweight daily trainers with responsive cushioning"
                            }
                          },
                          {
                            "component": "ImageGallery",
                            "props": {
                              "images": [
                                {
                                  "src": "https://images.unsplash.com/photo-1542291026-7eec264c27ff?auto=format&fit=crop&w=1200&q=80",
                                  "alt": "Sneakers angled side view",
                                  "details": "Side profile showing breathable mesh and cushioned midsole"
                                },
                                {
                                  "src": "https://images.unsplash.com/photo-1528701800489-20be3c1ea3b1?auto=format&fit=crop&w=1200&q=80",
                                  "alt": "Sneakers top view",
                                  "details": "Top view highlighting laces and padded tongue"
                                },
                                {
                                  "src": "https://images.unsplash.com/photo-1600269452121-4f2416e55c28?auto=format&fit=crop&w=1200&q=80",
                                  "alt": "Sneakers outsole view",
                                  "details": "Rubber outsole pattern for traction"
                                },
                                {
                                  "src": "https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1200&q=80",
                                  "alt": "Sneakers lifestyle shot",
                                  "details": "Everyday styling in an urban setting"
                                }
                              ]
                            }
                          }
                        ],
                        "variant": "card"
                      }
                    },
                    {
                      "component": "Card",
                      "props": {
                        "children": [
                          {
                            "component": "CardHeader",
                            "props": {
                              "title": "AeroStride Runner",
                              "subtitle": "Men's / Women's • Road & casual"
                            }
                          },
                          {
                            "component": "Stack",
                            "props": {
                              "children": [
                                {
                                  "component": "TextContent",
                                  "props": {
                                    "text": "$129.00",
                                    "size": "large-heavy"
                                  }
                                },
                                {
                                  "component": "Tag",
                                  "props": {
                                    "text": "In stock",
                                    "icon": "check",
                                    "size": "md",
                                    "variant": "success"
                                  }
                                }
                              ],
                              "direction": "row",
                              "gap": "m",
                              "align": "center",
                              "justify": "between",
                              "wrap": true
                            }
                          },
                          {
                            "component": "Separator",
                            "props": {
                              "orientation": "horizontal",
                              "decorative": true
                            }
                          },
                          {
                            "component": "Form",
                            "props": {
                              "name": "select_size",
                              "fields": [
                                {
                                  "component": "FormControl",
                                  "props": {
                                    "label": "Size",
                                    "input": {
                                      "component": "Select",
                                      "props": {
                                        "name": "size",
                                        "items": [
                                          {
                                            "component": "SelectItem",
                                            "props": {
                                              "value": "7",
                                              "label": "US 7"
                                            }
                                          },
                                          {
                                            "component": "SelectItem",
                                            "props": {
                                              "value": "7.5",
                                              "label": "US 7.5"
                                            }
                                          },
                                          {
                                            "component": "SelectItem",
                                            "props": {
                                              "value": "8",
                                              "label": "US 8"
                                            }
                                          },
                                          {
                                            "component": "SelectItem",
                                            "props": {
                                              "value": "8.5",
                                              "label": "US 8.5"
                                            }
                                          },
                                          {
                                            "component": "SelectItem",
                                            "props": {
                                              "value": "9",
                                              "label": "US 9"
                                            }
                                          },
                                          {
                                            "component": "SelectItem",
                                            "props": {
                                              "value": "9.5",
                                              "label": "US 9.5"
                                            }
                                          },
                                          {
                                            "component": "SelectItem",
                                            "props": {
                                              "value": "10",
                                              "label": "US 10"
                                            }
                                          },
                                          {
                                            "component": "SelectItem",
                                            "props": {
                                              "value": "10.5",
                                              "label": "US 10.5"
                                            }
                                          },
                                          {
                                            "component": "SelectItem",
                                            "props": {
                                              "value": "11",
                                              "label": "US 11"
                                            }
                                          },
                                          {
                                            "component": "SelectItem",
                                            "props": {
                                              "value": "12",
                                              "label": "US 12"
                                            }
                                          }
                                        ],
                                        "placeholder": "Select your size...",
                                        "rules": ["required"]
                                      }
                                    }
                                  }
                                }
                              ]
                            }
                          },
                          {
                            "component": "Separator",
                            "props": {
                              "orientation": "horizontal",
                              "decorative": true
                            }
                          },
                          {
                            "component": "Stack",
                            "props": {
                              "children": [
                                {
                                  "component": "TextContent",
                                  "props": {
                                    "text": "Color",
                                    "size": "small-heavy"
                                  }
                                },
                                {
                                  "component": "RadioGroup",
                                  "props": {
                                    "name": "color",
                                    "items": [
                                      {
                                        "component": "RadioItem",
                                        "props": {
                                          "label": "Black / White",
                                          "description": "Classic contrast with white midsole",
                                          "value": "black_white"
                                        }
                                      },
                                      {
                                        "component": "RadioItem",
                                        "props": {
                                          "label": "Sand / Gum",
                                          "description": "Neutral upper with gum outsole",
                                          "value": "sand_gum"
                                        }
                                      },
                                      {
                                        "component": "RadioItem",
                                        "props": {
                                          "label": "Slate / Neon",
                                          "description": "Cool tones with neon accents",
                                          "value": "slate_neon"
                                        }
                                      }
                                    ],
                                    "defaultValue": "black_white",
                                    "rules": ["required"]
                                  }
                                }
                              ],
                              "direction": "column",
                              "gap": "s"
                            }
                          },
                          {
                            "component": "Separator",
                            "props": {
                              "orientation": "horizontal",
                              "decorative": true
                            }
                          },
                          {
                            "component": "Buttons",
                            "props": {
                              "buttons": [
                                {
                                  "component": "Button",
                                  "props": {
                                    "label": "Add to Cart",
                                    "action": "action:add_to_cart_sneakers",
                                    "variant": "primary"
                                  }
                                },
                                {
                                  "component": "Button",
                                  "props": {
                                    "label": "Save",
                                    "action": "action:save_sneakers",
                                    "variant": "secondary"
                                  }
                                }
                              ],
                              "direction": "row"
                            }
                          },
                          {
                            "component": "TextContent",
                            "props": {
                              "text": "Free returns within 30 days. Ships in 1–2 business days.",
                              "size": "small"
                            }
                          }
                        ],
                        "variant": "card"
                      }
                    }
                  ],
                  "direction": "row",
                  "gap": "l",
                  "align": "start",
                  "justify": "start",
                  "wrap": true
                }
              },
              {
                "component": "Stack",
                "props": {
                  "children": [
                    {
                      "component": "Card",
                      "props": {
                        "children": [
                          {
                            "component": "CardHeader",
                            "props": {
                              "title": "About this item",
                              "subtitle": "Built for comfort from morning commutes to weekend miles"
                            }
                          },
                          {
                            "component": "MarkDownRenderer",
                            "props": {
                              "textMarkdown": "The **AeroStride Runner** blends breathable mesh with a supportive heel counter for a secure fit. A responsive foam midsole delivers soft landings and quick transitions, while the durable rubber outsole adds traction on city streets.\n\n**Fit note:** True to size. If you’re between sizes, consider going up 0.5.",
                              "variant": "clear"
                            }
                          },
                          {
                            "component": "TagBlock",
                            "props": {
                              "tags": [
                                "Breathable mesh upper",
                                "Responsive foam cushioning",
                                "Rubber traction outsole",
                                "Padded collar & tongue",
                                "Everyday training"
                              ]
                            }
                          }
                        ],
                        "variant": "sunk"
                      }
                    },
                    {
                      "component": "Card",
                      "props": {
                        "children": [
                          {
                            "component": "CardHeader",
                            "props": {
                              "title": "Specs",
                              "subtitle": "Materials, weight, and care"
                            }
                          },
                          {
                            "component": "Table",
                            "props": {
                              "columns": [
                                {
                                  "component": "Col",
                                  "props": {
                                    "label": "Detail",
                                    "type": "string"
                                  }
                                },
                                {
                                  "component": "Col",
                                  "props": {
                                    "label": "Value",
                                    "type": "string"
                                  }
                                }
                              ],
                              "rows": [
                                ["Weight", "9.8 oz (US 9)"],
                                ["Drop", "8 mm"],
                                ["Upper", "Engineered mesh"],
                                ["Midsole", "EVA-based foam"],
                                ["Outsole", "High-abrasion rubber"],
                                ["Care", "Spot clean; air dry"]
                              ]
                            }
                          }
                        ],
                        "variant": "sunk"
                      }
                    }
                  ],
                  "direction": "row",
                  "gap": "l",
                  "align": "start",
                  "justify": "start",
                  "wrap": true
                }
              }
            ],
            "direction": "column",
            "gap": "l"
          }
        }
      ],
      "direction": "column",
      "gap": "l"
    }
  },
  "error": null
}