LinkButtonComponent

open class LinkButtonComponent : PushButtonComponent

This class extends the PushButtonComponent and adds link specific properties to it.

Example:

linkButton {
text("fritz2") // define the default label
href("//www.fritz2.dev") // specifies the URL of the page the link goes to
target("_blank") // specifies where to open the linked document

icon { fromTheme { check } } // set up an icon
iconPlacement { right } // place the icon on the right side (``left`` is the default)
loading(someStore.loading) // pass in some [Flow<Boolean>] that shows a spinner if ``true`` is passed
loadingText("saving") // show an _alternate_ label, if store sends ``true``
disabled(true) // disable the button; could also be a ``Flow<Boolean>`` for dynamic disabling
element {
// exposes the underlying HTML button element for direct access. Use with caution!
}
}

See also

Constructors

LinkButtonComponent
Link copied to clipboard
js
fun LinkButtonComponent()

Functions

enabled
Link copied to clipboard
js
open override fun enabled(value: Boolean)
open override fun enabled(value: Flow<Boolean>)
href
Link copied to clipboard
js
fun href(value: String)
fun href(value: Flow<String>)
loading
Link copied to clipboard
js
fun loading(value: Flow<Boolean>)
loadingText
Link copied to clipboard
js
fun loadingText(value: String)
fun loadingText(value: Flow<String>)
render
Link copied to clipboard
js
open override fun render(context: RenderContext, styling: BoxParams.() -> Unit, baseClass: StyleClass, id: String?, prefix: String)
Central method that should do the actual rendering of a component.
target
Link copied to clipboard
js
fun target(value: String)
fun target(value: Flow<String>)
text
Link copied to clipboard
js
fun text(value: String)
fun text(value: Flow<String>)
tooltip
Link copied to clipboard
js
open override fun tooltip(vararg text: String, build: TooltipComponent.() -> Unit)
open override fun tooltip(styling: BasicParams.() -> Unit, text: String?, baseClass: StyleClass, id: String, prefix: String, build: TooltipComponent.() -> Unit)

Properties

centerIconStyle
Link copied to clipboard
js
val centerIconStyle: Style<BasicParams>
centerSpinnerStyle
Link copied to clipboard
js
val centerSpinnerStyle: Style<BasicParams>
disabled
Link copied to clipboard
js
open override val disabled: DynamicComponentProperty<Boolean>
element
Link copied to clipboard
js
open override val element: ComponentProperty<Button.() -> Unit>
This property enables the client to access the deeper features of an element even though the component itself does not offer an appropriate functionality.
events
Link copied to clipboard
js
open override val events: ComponentProperty<EventContext<HTMLButtonElement>.() -> Unit>
This property enables the client to access all events offered by the underlying HTML element.
icon
Link copied to clipboard
js
val icon: ComponentProperty<Icons.() -> IconDefinition?>
leftIconStyle
Link copied to clipboard
js
val leftIconStyle: Style<BasicParams>
leftSpinnerStyle
Link copied to clipboard
js
val leftSpinnerStyle: Style<BasicParams>
renderTooltip
Link copied to clipboard
js
open override val renderTooltip: ComponentProperty<Tag<HTMLElement>.() -> Unit>
rightIconStyle
Link copied to clipboard
js
val rightIconStyle: Style<BasicParams>
rightSpinnerStyle
Link copied to clipboard
js
val rightSpinnerStyle: Style<BasicParams>
size
Link copied to clipboard
js
val size: ComponentProperty<FormSizesStyles.() -> Style<BasicParams>>
type
Link copied to clipboard
js
val type: ComponentProperty<PushButtonTypes.() -> ColorScheme>
variant
Link copied to clipboard