Tooltip Component
open class TooltipComponent(textFromParam: String?) : EventProperties<HTMLElement>
Content copied to clipboard
This component creates a Tooltip
A tooltip should be used to display fast information for the user. The individual text will be shown on hovering the RenderContext' element in which it is called.
This class offers the following configuration features:
text can be a
vararg, a flow, a list, a flow of list of String or a simple string, optional can be use the @property textFromParam.placement of the text around the
RenderContextin which be called. Available placements aretop,topStart,topEnd,bottom,bottomStart,bottomEnd,left,leftStart,leftEnd,right,rightStart,rightEnd.
The render function of TooltipComponent uses the fritz2 dev.fritz2.components.popup.PopupComponent
Example usage:
span {
+"hover me"
tooltip("my Tooltip on right side") {
placement { right }
}
}
span {
+"hover me to see a multiline tooltip"
tooltip("first line", "second line"){}
}
span {
+"hover me for custom colored tooltip"
tooltip({
color { danger.mainContrast }
background {
color { danger.main }
}
}) {
text(listOf("first line", "second line"))
placement { bottomEnd }
}
}See also
PopupComponent
Constructors
TooltipComponent
Link copied to clipboard
Functions
Properties
events
Link copied to clipboard
open override val events: ComponentProperty<EventContext<HTMLElement>.() -> Unit>
Content copied to clipboard
placement
Link copied to clipboard