<aside> ⚠️ This project is a WIP

</aside>

Introduction

Ditto is an attempt at Server Driven UI inspired by Airbnb’s SDUI system.

Cheatsheet

PAGE

List Page JSON

{
	"views": [
		// View Json Nodes
	],
	"actions": {
		// Action Json Map
	}
}

VIEW

Type: view:ViewName

{
		"type": "view:ImageAvatar",
		"data": {
			"id": "imageId-12",
			"imageUrl": "https:\\/\\/i.pravatar.cc\\/400",
			"imageShape": "CIRCLE"
		}
}

Nested

Type: view:NestedViewName

Data: must contain list array node

{
		"type": "view:NestedList",
		"data": {
			"spacingInDp": 8,
			"showLineSeparators": false,
			"layoutType": "GRID",
			"list": [{
				"type": "view:NestedCard",
				"data": {
					"isHorizontal": false,
					"list": [{
						"type": "view:CellKeyValueOneAfter",
						"data": {
							"key": "Ice Cream Flavour",
							"value": "Chocolate"
						}
			}]
		}
}

ACTION

Ditto Actions action:ActionName