package bonsai

  1. Overview
  2. Docs
A library for building dynamic webapps, using Js_of_ocaml

Install

Dune Dependency

Authors

Maintainers

Sources

bonsai-v0.16.0.tar.gz
sha256=1d68aab713659951eba5b85f21d6f9382e0efa8579a02c3be65d9071c6e86303

doc/bonsai.web_ui_view/Bonsai_web_ui_view/Theme/index.html

Module Bonsai_web_ui_view.ThemeSource

Sourcetype t
Sourceval name : t -> string

Returns the name of the theme

Fetches the theme currently installed into Bonsai's scope.

Sets the given theme as 'current' for the provided computation, and registers the returned Vdom node as the "application-node" giving it the power to do things like set the window's background color and font-family.

Same as set_for_app but permits the app to return an arbitrary value in addition to the top-level app component

Sourceval override_constants_for_computation : f:(Constants.t -> Constants.t) -> 'a Bonsai.Computation.t -> 'a Bonsai.Computation.t

This function allows the caller to build a new theme based on the current theme's constants, installing that new theme for all users inside the given computation.

Sourceval set_for_computation : t Bonsai.Value.t -> 'a Bonsai.Computation.t -> 'a Bonsai.Computation.t

set_temporarily will install a new theme for all theme-users inside the given computation.

OCaml

Innovation. Community. Security.