Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Index of values


A
ask_question [Ot_popup]

ask_question ?a ?a_hcf question buttons Prompt a user, wait for its response and return the selected value.

attach [Ot_noderesize]

B
bind [Ot_swipe]
bind [Ot_picture_uploader]

bind is a shortcut for bind_input and bind_submit actions

bind_arrow_keys [Ot_carousel]

Make arrow keys cause event change.

bind_input [Ot_picture_uploader]

bind_input input preview ?container ?reset () Bind input and preview so the file selected in input is the image displayed in preview.

bind_submit [Ot_picture_uploader]

bind_submit input button ?cropping ~upload ~after_submit () binds the following two actions to button when it is being clicked: call do_submit which uploads the file; then call after_submit

bottom [Ot_style]
bullets [Ot_carousel]

List of bullets for carousel.


C
click_outside [Ot_lib]

click_outside e returns when user clicks outside element e.

client_bottom [Ot_size]
client_height [Ot_size]
client_left [Ot_size]
client_page_bottom [Ot_size]
client_page_left [Ot_size]
client_page_right [Ot_size]
client_page_top [Ot_size]

position of an element relative to the document

client_right [Ot_size]

size of an element

client_top [Ot_size]

position of an element relative to the inner window; getClientBoundingRect does not include borders by default, use with_margin to take them into account.

client_width [Ot_size]
confirm [Ot_popup]

Shortcut using ask_question for prompting the user with a question and returning a boolean.

cropper [Ot_picture_uploader]

let (reset, cropping, cropper_dom) = cropper ~image () reset is function to call to reset the current cropper status cropping are current cropping parameters cropper_dom is the div containing cropping controllers


D
detach [Ot_noderesize]
display [Ot_style]
display' [Ot_style]
display_of_str [Ot_style]
display_to_str [Ot_style]
do_submit [Ot_picture_uploader]

do_submit input ?cropping ~upload () input is the input with file loaded cropping are cropping info upload function to upload the file

drawer [Ot_drawer]

Build a drawer menu on the left or right of the screen.

dropdown [Ot_buttons]

F
float_of_px [Ot_style]

G
get_document_size [Ot_size]
get_screen_orientation [Ot_size]
get_screen_size [Ot_size]
get_size [Ot_size]

H
hcf [Ot_popup]

Section with header, content and footer.

height [Ot_size]
height_to_bottom [Ot_size]

Compute the height of an element to the bottom of the page


I
in_ancestors [Ot_lib]
input [Ot_picture_uploader]

Create a file input element with good input type ot-pup-input class and wrap it into a label.

invisible [Ot_style]

whether an element is currently invisible in the DOM (not the screen); you might want to do a Ot_nodeready.nodeready before.

is_position_sticky [Ot_sticky]

whether computed CSS attribute "position" equals "sticky"

is_sticky [Ot_sticky]

whether element is sticky, either due to CSS attribute position:sticky or due to position:sticky polyfill make_sticky

iteri2 [Ot_lib.List]

K
keep_in_sight [Ot_sticky]

make sure an element gets never out of sight while scrolling by continuously (window scroll/resize) monitoring the position of the element and adjusting the top/left value.


L
left [Ot_style]

M
make [Ot_toggle]

make ?init_up ?up_txt ?down_txt () produces a binary toggle.

make [Ot_time_picker]

make ?action ?round_5 ?h24 () produces a clock-style time picker for hours and minutes.

make [Ot_range]

make ?txt_up ?txt_down ~f ~lb ub produces a widget for picking one of the values in [lb, ub) via "up" and "down" buttons marked with the text txt_up and txt_down.

make [Ot_carousel]

Creates a carousel from the elements of a list.

make [Ot_calendar]

make ?highlight ?click_any ?action produces a calendar.

make_date_picker [Ot_calendar]

make_date_picker ?init () returns a client-side reactive signal (y, m, d) corresponding to the date d:m:y that the user clicks on.

make_hours_minutes_seq [Ot_time_picker]

Alias of make.

make_sticky [Ot_sticky]

position:sticky polyfill which is not supported by some browsers.

marginBottom [Ot_style]
marginLeft [Ot_style]
marginRight [Ot_style]
marginTop [Ot_style]
mk_form [Ot_picture_uploader]

Ready-to-use form.


N
next [Ot_carousel]

Button to go to the next page (or more pages if offset is present).

nodeready [Ot_nodeready]
noderesize [Ot_noderesize]
num_active_spinners [Ot_spinner]

the number of spinners currently spinning


O
ocaml_service_upload [Ot_picture_uploader]
onloaded [Ot_spinner]

do an action once no spinners are spinning (could be right away)

onloads [Ot_lib]
onresizes [Ot_lib]

NOTE: be careful when using the functions onresizes, window_scroll, and window_scrolls.


P
pageYOffset [Ot_size]

Current vertical scroll position of the page.

parse_px [Ot_style]
popup [Ot_popup]

popup ?a ?close_button ?confirmation_onclose ?onclose gen_content Display a modal popup.

preview [Ot_picture_uploader]

Create a img element with no src, no alt and ot-pup-preview class.

previous [Ot_carousel]

Button to go to the previous page (or mores page if offset is present).

px_of_float [Ot_style]

R
resetup_form_signal [Ot_popup]
ribbon [Ot_carousel]

Menu (or tabs) for carousel.

right [Ot_style]

S
set_adaptative_height [Ot_size]

set_adaptative_height elt f will make the width of the element recomputed using f everytime the height of the window changes.

set_adaptative_width [Ot_size]

set_adaptative_width elt f will make the width of the element recomputed using f everytime the width of the window changes.

set_bottom [Ot_style]
set_height [Ot_style]
set_left [Ot_style]
set_position_sticky [Ot_sticky]

try to set CSS attribute "position" to "sticky".

set_right [Ot_style]
set_top [Ot_style]
set_width [Ot_style]
setup_tabcycle [Ot_popup]

setup_tabcycle makes a form in a popup more user-friendly, by focussing on the first element of the form and forcing tab keys to cycle through the elements of the form only (and not the elements of the page behind the popup).

setup_tabcycle_auto [Ot_popup]

setup_tabcycle_auto scans an element for tabbable elements (buttons, inputs) and feeds them to setup_tabcycle

style [Ot_style]
submit [Ot_picture_uploader]

Create a button with ot-pup-sumit clas

supports_position_sticky [Ot_sticky]

T
top [Ot_style]

U
update_width_height [Ot_size]

V
visibility [Ot_style]

W
wheel [Ot_carousel]

Carousel with 3D effect.

when_loaded [Ot_spinner]
width [Ot_size]
width_height [Ot_size]

NOTE: mind to stop any signals derived from the following signals (using React.S.stop) on unload.

window_scroll [Ot_lib]
window_scrolls [Ot_lib]

If ios_html_scroll_hack then listen on window + html + body instead of only window.

with_spinner [Ot_spinner]

On client side, with_spinner th returns immediately a spinner while Lwt thread th is not finished, that will automatically be replaced by the result of th when finished.

with_spinner_no_lwt [Ot_spinner]

Same as with_spinner but returns immediately.