glaze/basecoat/input_group
Basecoat documentation: https://basecoatui.com/components/input-group/
An input or textarea with icons, text or buttons attached to it.
Recipe
import glaze/basecoat/input_group
import lustre/attribute
import lustre/element/html
fn search() {
input_group.input_group([], [
html.input([attribute.placeholder("Search...")]),
input_group.addon([input_group.start()], [html.text("🔍")]),
input_group.addon([input_group.end()], [html.text("12 results")]),
])
}
Values
pub fn addon(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn bottom() -> attribute.Attribute(msg)
pub fn end() -> attribute.Attribute(msg)
pub fn input_group(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
Put the input or textarea first, followed by its addons.
pub fn start() -> attribute.Attribute(msg)
pub fn top() -> attribute.Attribute(msg)