package mosaic

  1. Overview
  2. Docs
Terminal UI framework for OCaml with The Elm Architecture

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mosaic-0.1.0.tbz
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9

doc/mosaic.ui/Mosaic_ui/Select/Props/index.html

Module Select.Props

type t

Declarative property bundle for reconciler diffing.

val make : ?options:item list -> ?selected_index:int -> ?background:Ansi.Color.t -> ?text_color:Ansi.Color.t -> ?focused_background:Ansi.Color.t -> ?focused_text_color:Ansi.Color.t -> ?selected_background:Ansi.Color.t -> ?selected_text_color:Ansi.Color.t -> ?description_color:Ansi.Color.t -> ?selected_description_color:Ansi.Color.t -> ?show_description:bool -> ?show_scroll_indicator:bool -> ?wrap_selection:bool -> ?item_spacing:int -> ?fast_scroll_step:int -> unit -> t

make () is a property set with the same defaults as create, with:

  • options items to display. Defaults to [].
  • selected_index initial selection, clamped to [0;length - 1]. Defaults to 0.
  • background unfocused background color. Defaults to transparent.
  • text_color unfocused text color. Defaults to white.
  • focused_background focused background color. Defaults to background when provided, otherwise a subtle dark gray.
  • focused_text_color focused text color. Defaults to text_color.
  • selected_background selected item background. Defaults to dark blue.
  • selected_text_color selected item text color. Defaults to yellow.
  • description_color description text color. Defaults to gray.
  • selected_description_color selected item description color. Defaults to light gray.
  • show_description whether to display description lines. Defaults to true.
  • show_scroll_indicator whether to display scroll position indicator. Defaults to false.
  • wrap_selection whether to wrap to the opposite end when navigating past list boundaries. Defaults to false.
  • item_spacing vertical spacing between items in cells, clamped to minimum 0. Defaults to 0.
  • fast_scroll_step items to skip with Shift+Up/Down, clamped to minimum 1. Defaults to 5.
val default : t

default is make ().

val equal : t -> t -> bool

equal a b is true iff a and b have identical visual properties.