Logo FS-Skia-UI

Button Module

Builders for the `Button` control — a clickable command surface with a text label.

Functions and values

Function or value Description

create arg1

Full Usage: create arg1

Parameters:
    arg0 : Attr<'msg> list

Returns: Control<'msg>
Type parameters: 'msg

Build a `Button` from its attributes; pair with `Button.text` and `Button.onClick`. The typed `Props` front door (`FS.Skia.UI.Controls.Typed`) is the recommended authoring path.

arg0 : Attr<'msg> list
Returns: Control<'msg>

enabled arg1

Full Usage: enabled arg1

Parameters:
    arg0 : bool

Returns: Attr<'msg>
Type parameters: 'msg

Set whether a `Button` is interactive (`Attr`; `false` greys it out and suppresses click dispatch). Omitted ≡ enabled.

arg0 : bool
Returns: Attr<'msg>

onClick arg1

Full Usage: onClick arg1

Parameters:
    arg0 : 'msg

Returns: Attr<'msg>
Type parameters: 'msg

Emit a fixed `'msg` when the `Button` is clicked (`Attr.onClick`); use `onClickWith` when the message depends on the event.

arg0 : 'msg
Returns: Attr<'msg>

onClickWith arg1

Full Usage: onClickWith arg1

Parameters:
Returns: Attr<'msg>
Type parameters: 'msg

Emit a `'msg` derived from the `ControlEvent` when the `Button` is clicked — the event-aware counterpart to `Button.onClick`.

arg0 : ControlEvent -> 'msg
Returns: Attr<'msg>

text arg1

Full Usage: text arg1

Parameters:
    arg0 : string

Returns: Attr<'msg>
Type parameters: 'msg

Set the `Button` label (`Attr` carrying the caption rendered on the command surface).

arg0 : string
Returns: Attr<'msg>

Type something to start searching.