denim_ui

The Denim UI library

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:24

Installation

nimble install denim_ui
choosenim install denim_ui
git clone https://github.com/nortero-code/denim-ui

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
denim_ui - - - - - - -

Source

Repository https://github.com/nortero-code/denim-ui
Homepage https://github.com/nortero-code/denim-ui
Registry Source nimble_official

README

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"