Start native apps faster with the Composables CLI ->
Function

semantics

Add semantics key/value pairs to the layout node, for use in testing, accessibility, etc.

semantics

Source set: Android
public fun SubspaceModifier.semantics(
    properties: (SubspaceSemanticsPropertyReceiver.() -> Unit)
): SubspaceModifier

Add semantics key/value pairs to the layout node, for use in testing, accessibility, etc.

Mental Model (Picture Frame vs. Canvas): When building a combined UI in Compose for XR, think of a Subspace node (such as SpatialPanel) as a "Picture Frame" existing in 3D space, and the standard 2D Compose UI elements inside it as the "Canvas".

Interop & Merging Guidance: The 3D Subspace semantics tree and the 2D foundational semantics tree operate as distinct hierarchies. Spatial containers do not support merging descendant semantics (mergeDescendants = true).

Parameters

properties Builder block where the semantics properties are defined.

semantics

Deprecated

Replaced by semantics that takes SubspaceSemanticsPropertyReceiver

Source set: Android
public fun SubspaceModifier.semantics(
    properties: (SemanticsPropertyReceiver.() -> Unit)
): SubspaceModifier

Add semantics key/value pairs to the layout node, for use in testing, accessibility, etc.

Parameters

properties Builder block where the semantics properties are defined.

Last updated: