Android
public sealed interface StackItemScope
Receiver scope used by item content in VerticalStack.
Functions
itemDecoration
public fun Modifier.itemDecoration(shape: Shape): Modifier
Adds a decoration shape for this item, which is used in graphical effects applied to stack items, e.g., item masking and depth effects. For each distinct shape inside a stack item, this modifier should be applied to match that shape's bounds. For simple items with just one shape (such as a card), only one modifier is needed.
Applying this modifier is optional but highly recommended. If not applied, the item will render normally but will not have the expected depth effect or masking behavior. Omitting this modifier is a valid use case when no visual item decoration effects are desired.
Parameters
| shape | The shape of the element this modifier is applied to. |