Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 897 Bytes

File metadata and controls

40 lines (27 loc) · 897 Bytes

Markup

⚠️ Nota bene: This document is highly WIP.

In BitSplash one defines a UI in an XML-ish dialect, similar to JSX:

Game = [state, setState] ->
  <game>
    <column padding={32}>
      {state.count}
      <button onClick={_ -> setState({count: state.count + 1})}>
        +1
      </button>
    </column>
  </game>;

This is similar to web frameworks like React. We use the lessons learned from those frameworks and give users a powerful and elegant way to program user interfaces.


Table of contents

🧱 Elements

A little about elements, their shadow DOM, their attributes and children, functions are children too.

📃 Attributes

What are attributes? What values are allowed? We use odd syntax for values.