Explorer

html-ui.option

description
An option of a select element (selected when selected is true)
type
Fn(value: String, label: String, selected: Boolean) -> @html.node
expression
fn(value$0, label$1, selected$2) =>
  @html.element(
    name: "option",
    attributes: @core.list-concat(
      left: [{name: "value", value: $0}],
      right: match $2 {
        true =>
          [{name: "selected", value: ""}],
        false =>
          []
      }
    ),
    children: [@html.text(text: $1)]
  )
visibility
public
html-ui.option (project html-ui, branch main, snapshot Daaw3vbJhY15cDW6JsA4JuXvffjj_qFyxoZQMUM8hvQ)
id: AJSOckV1OpaygRM_qXGr5i_m2UV_YaRj77bvpzx8gtc
content hash: uRa8XgZ38gkRjdAqpOlb8lBN1OgkvQBM3Pq--KDH2Os