TextLinkStyles

Class

Common
class TextLinkStyles(
    val style: SpanStyle? = null,
    val focusedStyle: SpanStyle? = null,
    val hoveredStyle: SpanStyle? = null,
    val pressedStyle: SpanStyle? = null,
)

Represents the styles of the links in the AnnotatedString in different states

These style objects will be applied to every LinkAnnotation annotation present in the AnnotatedString, overriding any styling that might be already present in the AnnotatedString at the LinkAnnotation's position.

If null is passed to the style argument, it means that a LinkAnnotation representing a link will not get a specific link styling for this state. Instead it will be styled according to the rest of the AnnotatedString.

The resulting style of the link is always a combination of all styles merged into one in the order style.merge(focusedStyle).merge(hoveredStyle).merge(pressedStyle).

Parameters

stylestyle configuration for a link that is always applied
focusedStylestyle configuration for a link applied on top of the style when the link is focused
hoveredStylestyle configuration for a link applied on top of the style when the link is hovered
pressedStylestyle configuration for a link applied on top of the style when the link is pressed