DisplayStyle

sealed interface DisplayStyle(source)

Defines different display styles for text composables.

Inheritors

Types

Link copied to clipboard
data class Basic(val onTextDisplayed: () -> Unit = {}) : DisplayStyle

A basic style that displays text without any animation or effect.

Link copied to clipboard
data class Blinking(val interval: Long = 500, val repeat: Repeat = Repeat.Continuous, val onBlink: () -> Unit = {}) : DisplayStyle

A blinking display style that makes the text appear and disappear at specified intervals.

Link copied to clipboard
data class Fading(val type: FadingType, val duration: Long = 1000, val onComplete: () -> Unit = {}) : DisplayStyle

A fading display style that gradually changes the opacity of the text.

Link copied to clipboard
data class Revealing(val cover: RevealingCover = RevealingCover.Default, val pattern: RevealingPattern = RevealingPattern.START_TO_END, val type: RevealingType = RevealingType.ByEachCharacter(delayInMillis = 80L), val delayBeforeRevealing: Long = 500, val onComplete: () -> Unit = {}) : DisplayStyle

A revealing display style that progressively uncovers the text in a specified pattern.

Link copied to clipboard
data class Scrolling(val direction: ScrollingDirection = ScrollingDirection.TOWARDS_TOP, val duration: Long = 3000, val repeat: Repeat = Repeat.Continuous, val onComplete: () -> Unit = {}) : DisplayStyle

A scrolling display style that scrolls the text in a specified direction.

Link copied to clipboard
data class Sliding(val direction: SlidingDirection = SlidingDirection.TOWARDS_START, val duration: Long = 3000, val repeat: Repeat = Repeat.Continuous, val onComplete: () -> Unit = {}) : DisplayStyle

A sliding display style that moves the text in a specified direction.

Link copied to clipboard
data class StickAndReveal(val cover: String? = null, val coverStickingDirection: TransitionDirection = TransitionDirection.TOP_TO_BOTTOM, val coverStickingDelay: Long = 80, val delayBeforeReveal: Long = 1000, val revealingDirection: TransitionDirection = TransitionDirection.BOTTOM_TO_TOP, val revealingDelay: Long = 70, val onComplete: () -> Unit = {}) : DisplayStyle

A combined display style where a text cover sticks for a while before revealing the text.

Link copied to clipboard
data class Typing(val typingDelayPerChar: Long = 80, val onTextDisplayed: () -> Unit = {}) : DisplayStyle

A typing display style that simulates typing effect by displaying characters one by one.