membrane.basic-components

button

(button {:keys [hover? text on-click extra context]})

Button component with hover state.

checkbox

(checkbox {:keys [checked? extra context]})

Checkbox component.

counter

(counter {:keys [num min max extra context], :or {num 0}})

double-click-threshold

dropdown

(dropdown {:keys [options selected open? extra context]})

dropdown-list

(dropdown-list {:keys [options selected extra context]})

effect-backward-char

(effect-backward-char dispatch! $cursor $select-cursor text)

effect-counter-dec

(effect-counter-dec dispatch! $num min)

effect-counter-inc

(effect-counter-inc dispatch! $num max)

effect-delete-backward

(effect-delete-backward dispatch! $cursor $select-cursor $text)

effect-drag

(effect-drag dispatch! $mpos pos)

effect-finish-drag

(effect-finish-drag dispatch! $select-cursor $cursor $down-pos pos text font)

effect-forward-char

(effect-forward-char dispatch! $cursor $select-cursor text)

effect-insert-newline

(effect-insert-newline dispatch! $cursor $select-cursor $text)

effect-insert-text

(effect-insert-text dispatch! $cursor $select-cursor $text s)

effect-move-cursor-to-pos

(effect-move-cursor-to-pos dispatch! $cursor text font pos)

effect-next-line

(effect-next-line dispatch! $cursor $select-cursor text)

effect-previous-line

(effect-previous-line dispatch! $cursor $select-cursor text)

effect-select

(effect-select dispatch! $selected value)

effect-start-drag

(effect-start-drag dispatch! $mpos $down-pos pos)

effect-text-double-click

(effect-text-double-click dispatch! $last-click $select-cursor $cursor pos text font)

effect-toggle

(effect-toggle dispatch! $bool)

effect-update-slider

(effect-update-slider dispatch! $num min max max-width integer? x)

horizontal-scrollbar

(horizontal-scrollbar total-width width offset-x)

number-slider

(number-slider {:keys [num max-width min max integer? mdown? extra context], :or {max-width 100}})

on-hover

(on-hover {:keys [hover? body extra context]})

Component for adding a hover? state.

on-mouse-out

(on-mouse-out {:keys [mouse-out body hover? extra context]})

scrollview

(scrollview {:keys [offset scroll-bounds body extra context], :or {offset [0 0]}})

Basic scrollview.

scroll-bounds should be a two element vector of width height of the scrollview body should be an element.

selectable-text

(selectable-text {:keys [text down-pos mpos last-click cursor select-cursor font extra context]})

test-scrollview

(test-scrollview {:keys [state extra context]})

textarea

(textarea {:keys [text border? font focus textarea-state extra context], :or {border? true}})

Textarea component.

textarea-light

(textarea-light {:keys [text font focus textarea-state extra context]})

Alternate look for textarea component.

textarea-view

(textarea-view {:keys [cursor focus? text select-cursor font border? extra context], :or {cursor 0, text "", border? true}})

Raw component for a basic textarea. textarea should be preferred.

vertical-scrollbar

(vertical-scrollbar total-height height offset-y)

workspace

(workspace {:keys [offset scroll-bounds body extra context], :or {offset [0 0]}})

Basic workspace.

scroll-bounds should be a two element vector of width height of the scrollview body should be an element.

Acts similar to a scrollview, but no scroll bars are shown and the scroll offset isn't clamped.