glaze/basecoat/popover

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

Popover helpers for rich floating content.

A popover typically has a trigger control and a floating content panel.

Note: This component requires JavaScript from Basecoat.

Anatomy

Recipe

import glaze/basecoat/popover
import lustre/element/html

fn my_popover() {
  popover.popover("my-popover", [
    popover.trigger([button.outline()], [html.text("Open")]),
    popover.content([], [
      html.p([], [html.text("Popover content here.")]),
    ]),
  ])
}

References

Values

pub fn align(a: String) -> attribute.Attribute(msg)
pub fn align_center() -> attribute.Attribute(msg)
pub fn align_end() -> attribute.Attribute(msg)
pub fn align_start() -> attribute.Attribute(msg)
pub fn content(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn content_with_id(
  popover_id: String,
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn popover(
  id: String,
  children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn side(s: String) -> attribute.Attribute(msg)
pub fn side_bottom() -> attribute.Attribute(msg)
pub fn side_left() -> attribute.Attribute(msg)
pub fn side_right() -> attribute.Attribute(msg)
pub fn side_top() -> attribute.Attribute(msg)
pub fn trigger(
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn trigger_with_id(
  popover_id: String,
  attrs: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)
Search Document