popup
fun Tag<HTMLElement>.popup(styling: BasicParams.() -> Unit = {}, baseClass: StyleClass = StyleClass.None, id: String = "fc2-popup-${Id.next()}", prefix: String = "popup", build: PopupComponent.() -> Unit): Div
Content copied to clipboard
This component creates a popup.
A popup should be used for to positioning content like tooltip or popover automatically in the right place near a trigger. It will pop(ped)up on every event which handledBy given handler.
Example usage
popup {
placement { topStart }
trigger { toggle, _ -> // close handler not needed here
button {
+"toggle"
clicks.map { it.currentTarget } handledBy toggle
}
}
content {
div { +"my content" }
}
}See also
Parameters
styling
a lambda expression for declaring the styling of the actual dropdown as fritz2's styling DSL
baseClass
optional CSS class that should be applied to the element
id
the ID of element
prefix
the prefix for the generated CSS class resulting in the form $prefix-$hash
build
a lambda expression for setting up the component itself