Switch

com.alecdorrington.laminarcomponents.Switch
object Switch

An on/off setting: a checkbox, drawn as a slider (.lc-switch, its slider .lc-switch-track) with the switch role, or as a tick box (.lc-check).

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Switch.type

Members list

Value members

Concrete methods

def apply(caption: String, hint: String, on: Signal[Boolean], flips: Observer[Boolean]): L.HtmlElement

Renders a setting as a slider.

Renders a setting as a slider.

Value parameters

caption

The setting's name, beside it.

flips

The observer told of each change, true for on.

hint

The tooltip explaining it, none if empty.

on

Whether it is on.

Attributes

Returns

The setting.

def box(caption: String, hint: String, on: Signal[Boolean], flips: Observer[Boolean], locked: Signal[Boolean] = ...): L.HtmlElement

Renders a setting as a tick box, as in a form.

Renders a setting as a tick box, as in a form.

Value parameters

caption

The setting's name, beside it.

flips

The observer told of each change, true for on.

hint

The tooltip explaining it, none if empty.

locked

Whether it cannot be changed.

on

Whether it is on.

Attributes

Returns

The setting.