Element
Functions
For consistency on different platforms, if used with a padding modifier, use with Modifier.outerPadding and use after it, because the padding is not within the background. Otherwise, add an outer Box and use background on it.
Similar to fillMaxWidth but delegates to the stretch CSS value on JS DOM. See https://developer.mozilla.org/en-US/docs/Web/CSS/width#stretch.
For consistency on different platforms, components such as HorizontalScrollContainer, HorizontalScrollBox, HorizontalScrollRow are recommended over this modifier.
This delegates to the CSS padding property on JS DOM and adds the padding inside. For consistency on different platforms, please use it as the last modifier after the other modifiers such as background and clickable. See the KDoc of the padding overload with one Dp parameter for more information.
See the KDoc of the overload with one Dp parameter for platform differences.
Delegates to clickable on Android. onClick is not available on Android. See https://github.com/JetBrains/compose-multiplatform/issues/4468 for details.
Follows the default CSS border behavior that is on the outside.
Follows the default CSS border behavior that is on the outside.
This delegates to the CSS margin property on JS DOM and adds the padding outside. For consistency on different platforms, please use it as the first modifier before the other modifiers such as background and clickable.
See the KDoc of the overload with one Dp parameter for platform differences.
Padding works differently on Compose UI and CSS. In Compose UI, the padding modifier adds a layer of wrapper around the component, and order of modifiers matters; while in CSS, this function delegates to the margin CSS properties.
See the KDoc of the overload with one Dp parameter for platform differences.
An alias for hidden.
The border is not on top of the background.
Note that if the component is a layout, for example a Material card, it applies to the target as a whole on Compose UI targets, but applies to its content on JS DOM. For consistency on different platforms, components such as VerticalScrollContainer, VerticalScrollBox, VerticalScrollColumn are recommended over this modifier.