Tooltip Properties
interface TooltipProperties
Content copied to clipboard
This interface offers convenience functions to call a tooltip from withiin a component. It also provides a property to render the tooltip, that must be manually applied by an implementing component.
Example integration:
open class MyComponent : Component<Unit>, TooltipProperties by TooltipMixin() {
// ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
// implement interface delegate to mixin
override fun render(/* params omitted */) {
context.apply {
div {
this@MyComponent.renderTooltip.value.invoke(this) // render tooltip here
}
}
}
}Example usage:
myComponent() {
tooltip(text = "my Tooltip") { }
}
myComponent() {
tooltip({
color { danger.mainContrast }
background {
color { danger.main }
}
}) {
text("first line, second line")
placement { bottomEnd }
}
}
myComponent() {
tooltip("my tooltip") {}
}
myComponent() {
tooltip("my tooltip", "second line") { placement { bottom }}
}Functions
tooltip
Link copied to clipboard
open fun tooltip(vararg text: String, build: TooltipComponent.() -> Unit)
Content copied to clipboard
Properties
renderTooltip
Link copied to clipboard
abstract val renderTooltip: ComponentProperty<Tag<HTMLElement>.() -> Unit>
Content copied to clipboard
Inheritors
PushButtonComponent
Link copied to clipboard
CheckboxGroupComponent
Link copied to clipboard
CheckboxComponent
Link copied to clipboard
TooltipMixin
Link copied to clipboard
InputFieldComponent
Link copied to clipboard
MenuEntry
Link copied to clipboard
MenuLink
Link copied to clipboard
CustomMenuEntry
Link copied to clipboard
RadioGroupComponent
Link copied to clipboard
RadioComponent
Link copied to clipboard
SelectFieldComponent
Link copied to clipboard
SliderComponent
Link copied to clipboard
SwitchComponent
Link copied to clipboard
TextAreaComponent
Link copied to clipboard