Package-level declarations

Types

Link copied to clipboard
@Serializable
@SerialName(value = "breadcrumb")
data class BreadcrumbElement(val items: List<BreadcrumbElement.Breadcrumb>) : UiElement.Static
Link copied to clipboard
data class ButtonElement(val text: String, val onClick: () -> Unit, val onContextClick: () -> Unit? = null, val sentiment: Sentiment = Sentiment.Nominal, val enabled: Boolean = true, val latchOnPress: Boolean = false, val leadingSymbol: Symbol? = null, val trailingSymbol: Symbol? = null) : UiElement.Interactive

A clickable button not a part of a block of text.

Link copied to clipboard
data class CheckBoxElement(val checked: Boolean, val onClick: () -> Unit) : UiElement.Interactive

Checkbox form element.

Link copied to clipboard
@Serializable
@SerialName(value = "divider")
object DividerElement : UiElement.Static
Link copied to clipboard
@Serializable
@SerialName(value = "element-list")
data class ElementList(val items: List<UiElement>, val positioning: Positioning = Positioning.Start, val groupingStyle: GroupingStyle = GroupingStyle.Items, val orientation: Orientation = Orientation.Vertical) : UiElement.Static

UI element that composites multiple elements together.

Link copied to clipboard
@Serializable
@SerialName(value = "empty")
data object EmptyElement : UiElement.Static

UI Element that does nothing. Can be used as a default when no element should be shown, or in grids to fill blank space.

Link copied to clipboard
@Serializable
@SerialName(value = "formatted-text")
data class FormattedText(val spans: List<FormattedText.Span>, val paragraph: Boolean = true) : UiElement.Static
Link copied to clipboard
@Serializable
@SerialName(value = "icon")
data class IconElement(val symbol: Symbol, val sentiment: Sentiment = Sentiment.Nominal, val sizing: IconSizing = IconSizing.Medium) : UiElement.Static

A vector icon for signifying a noun or action.

Link copied to clipboard
data class MenuRowElement(val text: String, val onClick: () -> Unit? = null, val rightElement: UiElement? = null) : UiElement.Interactive

A clickable element in a list of related actions.

Link copied to clipboard
@Serializable
enum Orientation : Enum<Orientation>
Link copied to clipboard
@Serializable
sealed interface ProgressElement : UiElement.Static

UI Element to indicate linear progress of work being done.

Link copied to clipboard
data class SpinnerElement(val value: String, val onNextValue: () -> Unit, val onPreviousValue: () -> Unit, val hasPreviousValue: Boolean = true, val hasNextValue: Boolean = true) : UiElement.Interactive

An element that can be cycled through values for.

Link copied to clipboard
data class StackElement(val requireDistinct: Boolean = true) : UiElement.Interactive

Element that buffers UI elements into its own layout dynamically.

Link copied to clipboard
@Serializable
@SerialName(value = "status-indicator")
data class StatusIndicatorElement(val text: String, val sentiment: Sentiment) : UiElement.Static

UI Element to indicate the current state of a described label.

Link copied to clipboard
@Serializable
@SerialName(value = "text")
data class TextElement(val text: String, val style: TextStyle = TextStyle.Body) : UiElement.Static

A single contiguous block of text.

Link copied to clipboard
@Serializable
@SerialName(value = "text-list")
data class TextListElement(val items: List<FormattedText>, val ordered: Boolean = false) : UiElement.Static

A bulleted or numbered list of text items.

Link copied to clipboard
@Serializable
@SerialName(value = "throbber")
data class ThrobberElement(val caption: String? = null, val sentiment: Sentiment = Sentiment.Nominal) : UiElement.Static

UI Element to indicate that work is being done.

Link copied to clipboard
sealed interface UiElement

An individual view element in the UI.

Link copied to clipboard
data class WeatherElement(val temperature: String, val condition: WeatherElement.Condition, val secondaryText: String? = null, val title: String? = null, val daytime: Boolean = true, val sentiment: Sentiment? = null, val compact: Boolean = false) : UiElement.Static

Functions

Link copied to clipboard
fun inline(vararg items: UiElement): ElementList
Link copied to clipboard
fun items(vararg items: UiElement): ElementList
Link copied to clipboard
suspend fun StackElement.println(message: String, textStyle: TextStyle = TextStyle.Body)
Link copied to clipboard
fun sections(vararg items: UiElement): ElementList
Link copied to clipboard
fun unified(vararg items: UiElement): ElementList