sealed interface RemoteModifier

Known direct subclasses
RemoteModifier.Companion

The RemoteModifier companion object is the empty, default, or starter RemoteModifier that contains no elements.


An ordered, immutable collection of modifier elements for Remote Compose.

RemoteModifier is the remote-first equivalent of androidx.compose.ui.Modifier. It is used to decorate or augment remote composables (e.g., adding padding, background, or click listeners).

Remote modifiers are designed to be encoded and evaluatable on a remote compose player.

Summary

Nested types

The RemoteModifier companion object is the empty, default, or starter RemoteModifier that contains no elements.

Public companion functions

open infix RemoteModifier

Concatenates this modifier with another.

open String

Public functions

open infix RemoteModifier

Concatenates this modifier with another.

Extension functions

RemoteModifier

Aligns this layout with sibling layouts in a Row by their shared baseline.

RemoteModifier

Draws a solid color background behind the content.

RemoteModifier

Draws a remotePainter behind the content.

RemoteModifier
RemoteModifier.border(
    width: RemoteDp,
    color: RemoteColor,
    shape: RemoteShape
)

Draws a border around the element.

RemoteModifier
RemoteModifier.clickable(
    vararg actions: Action,
    enabled: Boolean,
    role: Role?
)
RemoteModifier
RemoteModifier.clickable(
    actions: List<Action>,
    enabled: Boolean,
    role: Role?
)
RemoteModifier
RemoteModifier
RemoteModifier

Creates a RemoteModifier that allows drawing with the component's content.

RemoteModifier

Sets the minimum and maximum height of the content.

RemoteModifier

Fills the maximum available height.

RemoteModifier

Fills the parent's maximum available height.

RemoteModifier

Sets the height of the content using RemoteDp.

RemoteModifier

Sets the height of the content using RemoteFloat.

RemoteModifier
RemoteModifier

Adds all padding to each edge of the content.

RemoteModifier

Adds all padding to each edge of the content.

RemoteModifier

Adds padding defined by the padding object.

RemoteModifier
RemoteModifier.padding(horizontal: RemoteDp, vertical: RemoteDp)

Adds horizontal padding to the left and right edges, and vertical padding to the top and bottom edges.

RemoteModifier
RemoteModifier.padding(horizontal: RemoteFloat, vertical: RemoteFloat)

Adds horizontal padding to the left and right edges, and vertical padding to the top and bottom edges.

RemoteModifier
RemoteModifier.padding(
    left: RemoteDp,
    top: RemoteDp,
    right: RemoteDp,
    bottom: RemoteDp
)

Adds padding to each edge of the content using Dp values.

RemoteModifier
RemoteModifier.padding(
    left: RemoteFloat,
    top: RemoteFloat,
    right: RemoteFloat,
    bottom: RemoteFloat
)

Adds padding to each edge of the content.

RemoteModifier

Modifier to be applied to a RemoteButton to ensure that its size meets the recommended minimums.

RemoteModifier

Clears the semantics of all descendants and sets new semantics.

RemoteModifier
RemoteModifier.semantics(
    mergeDescendants: Boolean,
    properties: SemanticsPropertyReceiver.() -> Unit
)

Adds semantics to the node.

RemoteModifier

Fills the parent's maximum available width and height.

RemoteModifier

Sets both the width and height of the content to size.

RemoteModifier
RemoteModifier.size(width: RemoteDp, height: RemoteDp)

Sets the width and height of the content.

RemoteModifier

Wraps the content size to its intrinsic dimensions.

RemoteModifier
RemoteModifier
RemoteModifier
RemoteModifier.onTouchDown(vararg actions: Action)
RemoteModifier
RemoteModifier
RemoteModifier.onTouchUp(vararg actions: Action)
RemoteModifier
RemoteModifier
RemoteModifier

Sets the minimum and maximum width of the content.

RemoteModifier

Fills the maximum available width.

RemoteModifier

Fills the parent's maximum available width.

RemoteModifier

Sets the width of the content using RemoteDp.

RemoteModifier

Sets the width of the content using RemoteFloat.

RemoteModifier

Public companion functions

then

open infix fun then(other: RemoteModifier): RemoteModifier

Concatenates this modifier with another.

Returns a RemoteModifier representing this modifier followed by other in sequence.

toString

open fun toString(): String

Public functions

then

Added in 1.0.0-alpha07
open infix fun then(other: RemoteModifier): RemoteModifier

Concatenates this modifier with another.

Returns a RemoteModifier representing this modifier followed by other in sequence.

Extension functions

RemoteModifier.alignByBaseline

fun RemoteModifier.alignByBaseline(): RemoteModifier

Aligns this layout with sibling layouts in a Row by their shared baseline.

This modifier is used to align layouts within a Row based on their first baseline. It is particularly useful for aligning text-based elements to ensure their baselines match up, creating a visually consistent layout.

This is the remote equivalent of the Modifier.alignByBaseline() modifier in Jetpack Compose.

Example usage within a remote Row:

RemoteRow(
modifier = RemoteModifier.fillMaxWidth()
)
{
RemoteText(
text = "First",
modifier = RemoteModifier.alignByBaseline()
)
RemoteText(
text = "Second",
modifier = RemoteModifier.alignByBaseline()
)
}

RemoteModifier.background

fun RemoteModifier.background(color: RemoteColor): RemoteModifier

Draws a solid color background behind the content.

Parameters
color: RemoteColor

The RemoteColor to use for the background.

RemoteModifier.background

fun RemoteModifier.background(remotePainter: RemotePainter): RemoteModifier

Draws a remotePainter behind the content.

Parameters
remotePainter: RemotePainter

The RemotePainter to use for the background.

fun RemoteModifier.border(
    width: RemoteDp,
    color: RemoteColor,
    shape: RemoteShape = RemoteRectangleShape
): RemoteModifier

Draws a border around the element.

Parameters
width: RemoteDp

The width of the border.

color: RemoteColor

The color of the border.

shape: RemoteShape = RemoteRectangleShape

The shape of the border. When RemoteRoundedCornerShape is used, only the RemoteRoundedCornerShape.topStart corner size is currently taken into consideration for all corners.

fun RemoteModifier.clickable(
    vararg actions: Action,
    enabled: Boolean = true,
    role: Role? = Role.Button
): RemoteModifier
fun RemoteModifier.clickable(
    actions: List<Action>,
    enabled: Boolean = true,
    role: Role? = Role.Button
): RemoteModifier
fun RemoteModifier.clip(shape: RemoteShape = RemoteRectangleShape): RemoteModifier
@Composable
fun RemoteModifier.clip(shape: Shape, size: DpSize = DpSize.Unspecified): RemoteModifier

RemoteModifier.drawWithContent

fun RemoteModifier.drawWithContent(onDraw: RemoteContentDrawScope.() -> Unit): RemoteModifier

Creates a RemoteModifier that allows drawing with the component's content.

Parameters
onDraw: RemoteContentDrawScope.() -> Unit

The drawing block that provides access to RemoteContentDrawScope.

fun RemoteModifier.heightIn(min: RemoteDp? = null, max: RemoteDp? = null): RemoteModifier

Sets the minimum and maximum height of the content.

Parameters
min: RemoteDp? = null

The minimum height.

max: RemoteDp? = null

The maximum height.

RemoteModifier.fillMaxHeight

fun RemoteModifier.fillMaxHeight(fraction: RemoteFloat = 1f.rf): RemoteModifier

Fills the maximum available height.

Parameters
fraction: RemoteFloat = 1f.rf

The fraction of the maximum height to use.

RemoteModifier.fillParentMaxHeight

fun RemoteModifier.fillParentMaxHeight(fraction: RemoteFloat = 1f.rf): RemoteModifier

Fills the parent's maximum available height.

Parameters
fraction: RemoteFloat = 1f.rf

The fraction of the parent's maximum height to use.

fun RemoteModifier.height(height: RemoteDp): RemoteModifier

Sets the height of the content using RemoteDp.

fun RemoteModifier.height(height: RemoteFloat): RemoteModifier

Sets the height of the content using RemoteFloat.

fun RemoteModifier.padding(all: RemoteDp): RemoteModifier

Adds all padding to each edge of the content.

fun RemoteModifier.padding(all: RemoteFloat): RemoteModifier

Adds all padding to each edge of the content.

fun RemoteModifier.padding(padding: RemotePaddingValues): RemoteModifier

Adds padding defined by the padding object.

fun RemoteModifier.padding(
    horizontal: RemoteDp = 0.rdp,
    vertical: RemoteDp = 0.rdp
): RemoteModifier

Adds horizontal padding to the left and right edges, and vertical padding to the top and bottom edges.

fun RemoteModifier.padding(
    horizontal: RemoteFloat = 0f.rf,
    vertical: RemoteFloat = 0f.rf
): RemoteModifier

Adds horizontal padding to the left and right edges, and vertical padding to the top and bottom edges.

fun RemoteModifier.padding(
    left: RemoteDp = 0.rdp,
    top: RemoteDp = 0.rdp,
    right: RemoteDp = 0.rdp,
    bottom: RemoteDp = 0.rdp
): RemoteModifier

Adds padding to each edge of the content using Dp values.

Parameters
left: RemoteDp = 0.rdp

Padding at the left edge.

top: RemoteDp = 0.rdp

Padding at the top edge.

right: RemoteDp = 0.rdp

Padding at the right edge.

bottom: RemoteDp = 0.rdp

Padding at the bottom edge.

fun RemoteModifier.padding(
    left: RemoteFloat = 0f.rf,
    top: RemoteFloat = 0f.rf,
    right: RemoteFloat = 0f.rf,
    bottom: RemoteFloat = 0f.rf
): RemoteModifier

Adds padding to each edge of the content.

Parameters
left: RemoteFloat = 0f.rf

Padding at the left edge.

top: RemoteFloat = 0f.rf

Padding at the top edge.

right: RemoteFloat = 0f.rf

Padding at the right edge.

bottom: RemoteFloat = 0f.rf

Padding at the bottom edge.

RemoteModifier.buttonSizeModifier

fun RemoteModifier.buttonSizeModifier(): RemoteModifier

Modifier to be applied to a RemoteButton to ensure that its size meets the recommended minimums.

RemoteModifier.clearAndSetSemantics

fun RemoteModifier.clearAndSetSemantics(properties: SemanticsPropertyReceiver.() -> Unit): RemoteModifier

Clears the semantics of all descendants and sets new semantics.

Parameters
properties: SemanticsPropertyReceiver.() -> Unit

A lambda to configure the semantics.

fun RemoteModifier.semantics(
    mergeDescendants: Boolean = false,
    properties: SemanticsPropertyReceiver.() -> Unit
): RemoteModifier

Adds semantics to the node.

Parameters
mergeDescendants: Boolean = false

Whether to merge the semantics of all descendants into this node.

properties: SemanticsPropertyReceiver.() -> Unit

A lambda to configure the semantics.

RemoteModifier.fillMaxSize

fun RemoteModifier.fillMaxSize(fraction: RemoteFloat = 1f.rf): RemoteModifier

Fills the parent's maximum available width and height.

Parameters
fraction: RemoteFloat = 1f.rf

The fraction of the parent's maximum size to use.

fun RemoteModifier.size(size: RemoteDp): RemoteModifier

Sets both the width and height of the content to size.

fun RemoteModifier.size(width: RemoteDp, height: RemoteDp): RemoteModifier

Sets the width and height of the content.

Parameters
width: RemoteDp

The width to apply.

height: RemoteDp

The height to apply.

RemoteModifier.wrapContentSize

fun RemoteModifier.wrapContentSize(): RemoteModifier

Wraps the content size to its intrinsic dimensions.

RemoteModifier.onTouchCancel

fun RemoteModifier.onTouchCancel(vararg actions: Action): RemoteModifier

RemoteModifier.onTouchDown

fun RemoteModifier.onTouchDown(vararg actions: Action): RemoteModifier
fun RemoteModifier.onTouchUp(vararg actions: Action): RemoteModifier
fun RemoteModifier.widthIn(min: RemoteDp? = null, max: RemoteDp? = null): RemoteModifier

Sets the minimum and maximum width of the content.

Parameters
min: RemoteDp? = null

The minimum width.

max: RemoteDp? = null

The maximum width.

RemoteModifier.fillMaxWidth

fun RemoteModifier.fillMaxWidth(fraction: RemoteFloat = RemoteFloat(1f)): RemoteModifier

Fills the maximum available width.

Parameters
fraction: RemoteFloat = RemoteFloat(1f)

The fraction of the maximum width to use.

RemoteModifier.fillParentMaxWidth

fun RemoteModifier.fillParentMaxWidth(fraction: RemoteFloat = 1f.rf): RemoteModifier

Fills the parent's maximum available width.

Parameters
fraction: RemoteFloat = 1f.rf

The fraction of the parent's maximum width to use.

fun RemoteModifier.width(width: RemoteDp): RemoteModifier

Sets the width of the content using RemoteDp.

fun RemoteModifier.width(width: RemoteFloat): RemoteModifier

Sets the width of the content using RemoteFloat.