No description
Find a file
kristianhasselknippe bab47a37b6
Update readme.md
2023-10-26 17:39:36 +02:00
.github/workflows rename build step 2021-06-04 15:19:33 +02:00
docs Added cursorWhileKeyGlobal 2021-06-10 10:46:17 +02:00
examples Fixed example 2021-04-21 01:26:00 +02:00
src Added onRooted and onObservable(ObservableTable) 2021-09-15 08:53:48 +02:00
tests Fixed tests 2021-06-04 16:27:08 +02:00
.gitignore Started improving documentation 2021-04-20 22:50:10 +02:00
denim_ui.nimble Renamed from midio to denim 2021-01-11 12:49:22 +01:00
makefile Fixed tests 2021-06-04 16:27:08 +02:00
mkdocs.yml More documentation 2021-04-21 01:07:43 +02:00
readme.md Update readme.md 2023-10-26 17:39:36 +02:00

Denim UI

CI

A cross platform UI framework focused on fast and easy prototyping by the use of a custom DSL.

The various platforms are supported through separate backend implementations. An js backend that uses the canvas api for drawing and html for native components the only somewhat usable backend, but a native one is planned.

Documentation can be found here

Use at your own risk

Note that this project is still in an early phase, and subject to possibly large changes and breakages. Use at your own risk.

Minimal example

import denim_ui
import denim_ui_canvas

proc render(): Element =
  panel:
    rectangle(
      color = colCadetBlue,
      radius = (10.0, 2.0, 10.0, 2.0),
      width = 150,
      height = 60,
      alignment = Alignment.Center
    )
    text(
      text = "Hello world!",
      fontSize = 14.0,
      color = colWhite,
      alignment = Alignment.Center
    )

startApp(
  render,
  "rootCanvas",
  "nativeContainer"
)
<html lang="en">
	<body>
		<div id="nativeContainer">
			<canvas id="rootCanvas"></canvas>
		</div>
	</body>
	<!-- the bundle output by nim -->
	<script type="text/javascript" src="./dist/bundle.js"></script>
</html>

Installation

Denim UI is provided through the nimble package manager:

requires "denim_ui"

Backends

The only usable backend for denim UI is currently the canvas based javascript backend which can be added from nimble:

requires "denim_ui_canvas"