glaze/basecoat/input

Basecoat documentation: https://basecoatui.com/components/input/

Input helpers for common text-like controls.

These helpers style native <input> elements and provide small attribute helpers for common patterns.

Anatomy

Choose an input constructor (input, email, password, …) and pass native attributes from lustre/attribute plus any helpers in this module.

Recipe

import glaze/basecoat/input
import lustre/attribute

fn email_field() {
  input.input([
    attribute.id("email"),
    attribute.type_("email"),
    attribute.placeholder("Email"),
  ])
}

References

Values

pub fn date(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)
pub fn disabled() -> attribute.Attribute(msg)
pub fn email(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)
pub fn id(id: String) -> attribute.Attribute(msg)
pub fn input(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)
pub fn invalid() -> attribute.Attribute(msg)
pub fn name(n: String) -> attribute.Attribute(msg)
pub fn number(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)
pub fn password(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)
pub fn placeholder(text: String) -> attribute.Attribute(msg)
pub fn search(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)
pub fn time(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)
pub fn url(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)
pub fn value(text: String) -> attribute.Attribute(msg)
Search Document