Value_selector.Button
Button selectors.
The value is selected by clicking in a list of buttons. See the styling information.
val v : ?class':Jstr.t -> ?enabled:bool Note.signal -> ?button_class:('a -> Jstr.t) -> ?button_tip:('a -> Jstr.t Note.signal) ->
?xdir_align:Group.align -> ?dir_align:Group.align -> dir:Group.dir -> ('a -> Brr.El.t list Note.signal) -> 'a list Note.signal -> 'a option Note.signal -> 'a Group.t
v ~class' ~enaled ~eq label choices sel
is list of buttons for selecting a value. S.eq sel
is used to test values for equality in the list of choices
.
label
is used to label the choice buttons.choices
are the values among which to selectsel
is the value shown as selected, if any. It must be included in choices
button_class
is a class for choice buttons.enabled
indicates if the selector can be interacted with. Defaults to Note.S.Bool.true'
class'
is added to the underlying element's classes.The Group.action
of the result occurs whenever a new selection occurs.
The returned group and buttons makes use of the following CSS classes (the group styling also applies):
ui-button-selector
always on the groupui-selected
on the button currently selectedui-disabled
on the group and buttons whenever enabled
is false
.