The Ur/Web People Organizer
No doubt more documentation will materialize here soon. For now, see the
Ui module (e.g., in file
ui.urs) for definitions of the basic concepts underlying UPO. A quick tour of the big ideas:
- A value of type
Ui.t ais a first-class UI element, ready to drop onto a page without any further fuss. The type parameter
astands for the private state of such a component.
- A module of type
Ui.S0packages a UI element as a module rather than a value, for cases where that's a more convenient interface.
- A number of basic combinators are available to compose UI elements. For instance,
Ui.seqlays out a number of elements in sequence, and
Ui.constproduces a (boring) UI element that just displays some fixed HTML.
- The easiest way to bring a (usually composite) UI element to life is to convert it into a page with
Ui.simple, which just takes one UI element as a parameter.
- Fancier pages include several tabs for selecting different full-page UI elements. The function
Ui.tabbedcreates such a page out of a tuple of elements, each with an optional title. (Tabs lacking titles are hidden.)
- Finally, pretty Bootstrap modal dialogs are supported via function
Ui.modalButtonthat creates HTML for the button, given a computation that decides which HTML to display in the dialog when the button is clicked. Function
Ui.modalis useful for creating that content.
Those are the basics! The other modules of the library define more complex UI elements, usually parameterized in a variety of ways. See the
examples directory, which includes the showcase apps and some simpler demos.