howdy/ui/input

Text inputs, text areas, selects and labels.

Controls follow their native state: attribute.disabled(True) dims them, and attribute.aria_invalid("true") gives them the danger colour. Pair an invalid control with a howdy/ui/field error through aria-describedby.

Values

pub fn classes() -> List(css.Class)

Every class this module uses, for howdy/ui/export.

pub fn input(
  attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)
pub fn input_class() -> css.Class
pub fn label(
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn label_class() -> css.Class
pub fn native_select(
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

The browser’s own select, styled to match the other controls. On phones it opens the system picker. For a list styled like the rest of the page, see howdy/ui/select. Children are html.option and html.optgroup elements. Attributes go on the <select>.

pub fn select_class() -> css.Class
pub fn select_wrapper_class() -> css.Class
pub fn textarea(
  attributes: List(attribute.Attribute(msg)),
  content: String,
) -> element.Element(msg)

A multiline text input. attribute.rows sets its initial height; the user can make it taller.

pub fn textarea_class() -> css.Class
✨ Search Document