Otter Snippets Otter Upstream Otter 1.0.1 Tested

Declarative UI Page Layout

Define a hierarchical declarative UI page structure with headings, cards, and buttons.

ID: snippet/ui-page-layout Version: 1.0.0 License: MIT Framework: Otter 1.0.1

Architecture & Runtime Preview

Otter 1.0.1

Zero-dependency Otter 1.0.1 snippet (User Interface). Copy the parameterized template or run the self-contained example.

  1. 1Category: User Interface
  2. 2Attribution: Otter Declarative UI Spec (D56)
  3. 3Zero external pack dependencies — paste directly into any .ot file

Source Code (2 files)

template.ot · otter
page "${pageTitle}"
    heading "${headingText}"
    card "${cardTitle}"
        text "${bodyText}"
        button "${buttonLabel}"
            click
                say "Clicked ${buttonLabel}"
    primary button "Submit"

Installation & Usage

otter snippet inspect ui-page-layout

Copy template.ot directly into your .ot source file, or run example.ot with 'otter run example.ot'.