List of Compose modifiers

Actions

Enable drag gestures between a set of predefined values.

Scope: Any

Enable drag gestures between a set of predefined values.

Scope: Any

Configure component to receive clicks via input or accessibility "click" event.

Scope: Any

Configure component to receive clicks via input or accessibility "click" event.

Scope: Any

Configure component to receive clicks, double clicks and long clicks via input or accessibility "click" event.

Scope: Any

Configure component to receive clicks, double clicks and long clicks via input or accessibility "click" event.

Scope: Any

Configure touch dragging for the UI element in both orientations.

Scope: Any

Configure touch dragging for the UI element in a single Orientation.

Scope: Any

Use this modifier to group a list of selectable items like Tabs or RadioButtons together for accessibility purpose.

Scope: Any

Configure component to be selectable, usually as a part of a mutually exclusive group, where only one item can be selected at any point in time.

Scope: Any

Configure component to be selectable, usually as a part of a mutually exclusive group, where only one item can be selected at any point in time.

Scope: Any

Configure component to make it toggleable via input and accessibility events

Scope: Any

Configure component to make it toggleable via input and accessibility events.

Scope: Any

Configure component to make it toggleable via input and accessibility events with three states: On, Off and Indeterminate.

Scope: Any

Configure component to make it toggleable via input and accessibility events with three states: On, Off and Indeterminate.

Scope: Any

The modifier that should be applied on a drag handle composable so the drag handle can be dragged and operate on the provided PaneExpansionState properly.

Alignment

Align the element vertically within the Row.

Scope: RowScope

Position the element vertically such that the alignment line for the content as determined by alignmentLineBlock aligns with sibling elements also configured to alignBy.

Scope: RowScope

Position the element vertically such that its alignmentLine aligns with sibling elements also configured to alignBy.

Scope: RowScope

Position the element vertically such that its first baseline aligns with sibling elements also configured to alignByBaseline or alignBy.

Scope: RowScope

Align the element horizontally within the Column.

Position the element horizontally such that the alignment line for the content as determined by alignmentLineBlock aligns with sibling elements also configured to alignBy.

Position the element horizontally such that its alignmentLine aligns with sibling elements also configured to alignBy.

Pull the content element to a specific Alignment within the Box.

Scope: BoxScope

Animation

Modifier to animate layout changes (position and/or size) that occur within a LookaheadScope.

Scope: Any

Apply this modifier to a FloatingActionButton to show or hide it with an animation, typically based on the app's main content scrolling.

Scope: Any

animateEnterExit modifier can be used for any direct or indirect children of AnimatedVisibility to create a different enter/exit animation than what's specified in AnimatedVisibility.

open

This modifier animates the item appearance (fade in), disappearance (fade out) and placement changes (such as an item reordering).

open

This modifier animates the item appearance (fade in), disappearance (fade out) and placement changes (such as an item reordering).

This modifier animates the item appearance (fade in), disappearance (fade out) and placement changes (such as an item reordering).

Border

Modify element to add border with appearance specified with a border and a shape and clip it.

Scope: Any

Modify element to add border with appearance specified with a width, a brush and a shape and clip it.

Scope: Any

Modify element to add border with appearance specified with a width, a color and a shape and clip it.

Scope: Any

Drawing

Draw content with modified alpha that may be less than 1.

Scope: Any

Draws shape with a solid color behind the content.

Scope: Any

Draws shape with brush behind the content.

Scope: Any

Clip the content to shape.

Scope: Any

Clip the content to the bounds of a layer defined at this modifier.

Scope: Any

Draw into a Canvas behind the modified content.

Scope: Any

Draw into a DrawScope with content that is persisted across draw calls as long as the size of the drawing area is the same or any state objects that are read have not changed.

Scope: Any

Creates a DrawModifier that allows the developer to draw before or after the layout's contents.

Scope: Any

Draws visual effects for this component when interactions occur.

Scope: Any

Paint the content using painter.

Scope: Any

Draws a drop shadow behind the rest of the content with the geometry specified by the given shape and the shadow properties defined the DropShadowScope.

Scope: Any

Draws a drop shadow behind the rest of the content with the geometry specified by the given shape and the shadow properties defined by the Shadow.

Scope: Any

Draws an inner shadow behind the rest of the content with the geometry specified by the given shape and the shadow properties defined the InnerShadowScope.

Scope: Any

Draws an inner shadow on top of the rest of the content with the geometry specified by the given shape and the shadow properties defined by the Shadow.

Scope: Any

Creates a graphicsLayer that draws a shadow.

Scope: Any

Adds padding to accommodate the safe drawing insets.

Scope: Any

Creates a modifier that controls the drawing order for the children of the same layout parent.

Scope: Any

Focus

Add this modifier to a component to observe focus state events.

Scope: Any

Add this modifier to a component to observe focus state events.

Scope: Any

Add this modifier to a component to make it focusable.

Scope: Any

This modifier allows you to specify properties that are accessible to focusTargets further down the modifier chain or on child layout nodes.

Scope: Any

Add this modifier to a component to request changes to focus.

Scope: Any

This modifier can be used to save and restore focus to a focus group.

Scope: Any

Creates a focus group or marks this component as a focus group.

Scope: Any

Configure component to be focusable via focus system or accessibility "focus" event.

Scope: Any

Graphics

Keyboard

Adding this modifier to the modifier parameter of a component will allow it to intercept hardware key events when it (or one of its children) is focused.

Scope: Any

Adding this modifier to the modifier parameter of a component will allow it to intercept hardware key events when it (or one of its children) is focused.

Scope: Any

Layout

Alternative to androidx.compose.ui.layout.layoutId that enables the use of tag.

Scope: Any

Tag the element with layoutId to identify the element within its parent.

Scope: Any

Creates a LayoutModifier that allows changing how the wrapped element is measured and laid out.

Scope: Any

Invoke onGloballyPositioned with the LayoutCoordinates of the element when the global position of the content may have changed.

Scope: Any

Other

Set autofill hint with contentType.

Scope: Any

Applies an animated marquee effect to the modified content if it's too wide to fit in the available space.

Scope: Any

Draw content blurred with the specified radii.

Scope: Any

Draw content blurred with the specified radii.

Scope: Any

Modifier that can be used to send bringIntoView requests.

Scope: Any

Declare a just-in-time composition of a Modifier that will be composed for each element it modifies.

Scope: Any

Declare a just-in-time composition of a Modifier that will be composed for each element it modifies.

Scope: Any

Declare a just-in-time composition of a Modifier that will be composed for each element it modifies.

Scope: Any

Declare a just-in-time composition of a Modifier that will be composed for each element it modifies.

Scope: Any

Declare a just-in-time composition of a Modifier that will be composed for each element it modifies.

Scope: Any

A Modifier that allows an element it is applied to be treated like a source for drag and drop operations.

Scope: Any

A Modifier that allows an element it is applied to be treated like a source for drag and drop operations.

Scope: Any

A modifier that allows for receiving from a drag and drop gesture.

Scope: Any

Set a requested frame rate on Composable

Scope: Any

Set a requested frame rate on Composable

Scope: Any

Configures an element to act as a handwriting detector which detects stylus handwriting and delegates handling of the recognised text to another element.

Scope: Any

Configures an element to act as a stylus handwriting handler which can handle text input from a handwriting session which was triggered by stylus handwriting on a handwriting detector.

Scope: Any

Configure component to be hoverable via pointer enter/exit events.

Scope: Any

A modifier that keeps the device screen on as long as it is part of the composition on supported platforms.

Scope: Any

This will map the RelativeLayoutBounds of the modifier into the provided LayoutBoundsHolder.

Scope: Any

Creates an approach layout intended to help gradually approach the destination layout calculated in the lookahead pass.

Scope: Any

Shows a Magnifier widget that shows an enlarged version of the content at sourceCenter relative to the current layout node.

Scope: Any

A Modifier that can be used to consume ModifierLocals that were provided by other modifiers to the left of this modifier, or above this modifier in the layout tree.

Scope: Any

A Modifier that can be used to provide ModifierLocals that can be read by other modifiers to the right of this modifier, or modifiers that are children of the layout node that this modifier is attached to.

Scope: Any

Invokes callback with the position of this layout node relative to the coordinate system of the root of the composition, as well as in screen coordinates and window coordinates.

Scope: Any

Invoke onPlaced after the parent LayoutModifier and parent layout has been placed and before child LayoutModifier is placed.

Scope: Any

Registers a callback to monitor whether or not the node is inside of the viewport of the window or not.

Scope: Any

Modifier that lets a developer define a pointer icon to display when a stylus is hovered over the element.

Scope: Any

Calls watcher with each MotionEvent that the layout area or any child pointerInput receives.

Scope: Any

Mark the layout rectangle as preferring to stay clear of floating windows.

Scope: Any

Mark a rectangle within the local layout coordinates preferring to stay clear of floating windows.

Scope: Any

A Modifier that adds nested scroll to a container to support a pull-to-refresh gesture.

Scope: Any

Configures the current node and any children nodes as a Content Receiver.

Scope: Any

Fits the contents within rulers.

Scope: Any

If one of the Rulers in rulers has a value within the bounds of the Layout, this sizes the content to that Ruler and the edge.

Scope: Any

This modifier hints that the composable renders sensitive content (i.e. username, password, credit card etc) on the screen, and the content should be protected during screen share in supported environments.

Scope: Any

Adding this modifier to the modifier parameter of a component will allow it to intercept hardware key events before they are sent to the software keyboard.

Scope: Any

Adding this modifier to the modifier parameter of a component will allow it to intercept hardware key events before they are sent to the software keyboard.

Scope: Any

Modifier that creates a region that is styled by the given Style object for the component this Modifier is attached to.

Scope: Any

Modifier that creates a region that is styled by the given Style object for the component this Modifier is attached to.

Scope: Any

Excludes the layout rectangle from the system gesture.

Scope: Any

Excludes a rectangle within the local layout coordinates from the system gesture.

Scope: Any

Adds a builder to be run when the text context menu is shown within this hierarchy.

Scope: Any

Adds a filter to be run when the text context menu is shown within this hierarchy.

Scope: Any

A Modifier that controls the visibility of the Layout it is applied to.

Scope: Any

Consume insets that haven't been consumed yet by other insets Modifiers similar to windowInsetsPadding without adding any padding.

Scope: Any

Consume paddingValues as insets as if the padding was added irrespective of insets.

Scope: Any

Calls block with the WindowInsets that have been consumed, either by consumeWindowInsets or one of the padding Modifiers, such as imePadding.

Scope: Any

This recalculates the WindowInsets based on the size and position.

Scope: Any

Renders the content in the SharedTransitionScope's overlay, where shared content (i.e. shared elements and shared bounds) is rendered by default.

sharedBounds is a modifier that tags a layout with a SharedContentState.key, such that entering and exiting shared bounds of the same key share the animated and continuously changing bounds during the layout change.

sharedElement is a modifier that tags a layout with a SharedContentState.key, such that entering and exiting shared elements of the same key share the animated and continuously changing bounds during the layout change.

sharedElementWithCallerManagedVisibility is a modifier that tags a layout with a SharedContentState.key, such that entering and exiting shared elements of the same key share the animated and continuously changing bounds during the layout change.

A modifier that anchors a layout at the target position obtained from the lookahead pass during shared element transitions.

open

Modifier which should be applied to an element inside the ExposedDropdownMenuBoxScope, typically a text field or an icon within the text field.

abstract

This modifier specifies the associated pane's margins according to the provided RectRulers as insets.

This modifier specifies the associated pane's margins according to specified fixed margins and the provided RectRulers as insets, if any.

Padding

A Modifier that can add padding to position the content according to specified distances from its bounds to an alignment line.

Scope: Any

A Modifier that can add padding to position the content according to specified distances from its bounds to an alignment line.

Scope: Any

A Modifier that positions the content in a layout such that the distance from the top of the layout to the baseline of the first line of text in the content is top, and the distance from the baseline of the last line of text in the content to the bottom of the layout is bottom.

Scope: Any

A Modifier that positions the content in a layout such that the distance from the top of the layout to the baseline of the first line of text in the content is top, and the distance from the baseline of the last line of text in the content to the bottom of the layout is bottom.

Scope: Any

Apply additional space along each edge of the content in Dp: left, top, right and bottom.

Scope: Any

Apply all dp of additional space along each edge of the content, left, top, right and bottom.

Scope: Any

Apply PaddingValues to the component as additional space along each edge of the content's left, top, right and bottom.

Scope: Any

Apply horizontal dp space along the left and right edges of the content, and vertical dp space along the top and bottom edges.

Scope: Any

Apply additional space along each edge of the content in Dp: start, top, end and bottom.

Scope: Any

Adds padding to accommodate the caption bar insets.

Scope: Any

Adds padding to accommodate the display cutout.

Scope: Any

Adds padding to accommodate the ime insets.

Scope: Any

Adds padding to accommodate the mandatory system gestures insets.

Scope: Any

Adds padding to accommodate the navigation bars insets.

Scope: Any

Adds padding to accommodate the safe content insets.

Scope: Any

Adds padding to accommodate the safe gestures insets.

Scope: Any

Adds padding to accommodate the status bars insets.

Scope: Any

Adds padding to accommodate the system bars insets.

Scope: Any

Adds padding to accommodate the system gestures insets.

Scope: Any

Adds padding to accommodate the waterfall insets.

Scope: Any

Adds padding so that the content doesn't enter insets space.

Scope: Any

Pointer

A Modifier that detects high-level click and horizontal swipe gestures from an IndirectPointerEvent source.

Scope: Any

Modifier that lets a developer define a pointer icon to display when the cursor is hovered over the element.

Scope: Any

A special PointerInputModifier that provides access to the underlying MotionEvents originally dispatched to Compose.

Scope: Any

Create a modifier for processing pointer input within the region of the modified element.

Scope: Any

Create a modifier for processing pointer input within the region of the modified element.

Scope: Any

Create a modifier for processing pointer input within the region of the modified element.

Scope: Any

Position

Offset the content by offset px.

Scope: Any

Offset the content by (x dp, y dp).

Scope: Any

Offset the content by offset px.

Scope: Any

Offset the content by (x dp, y dp).

Scope: Any

Scroll

Clips bounds of scrollable container on main axis while leaving space for background effects (like shadows) on cross axis.

Scope: Any

Modify element to make it participate in the nested scrolling hierarchy.

Scope: Any

Renders overscroll from the provided overscrollEffect.

Scope: Any

Adding this modifier to the modifier parameter of a component will allow it to intercept RotaryScrollEvents if it (or one of its children) is focused.

Scope: Any

Adding this modifier to the modifier parameter of a component will allow it to intercept RotaryScrollEvents if it (or one of its children) is focused.

Scope: Any

Modify element to allow to scroll horizontally when width of the content is bigger than max constraints allow.

Scope: Any

Modify element to allow to scroll horizontally when width of the content is bigger than max constraints allow.

Scope: Any

Modify element to allow to scroll vertically when height of the content is bigger than max constraints allow.

Scope: Any

Modify element to allow to scroll vertically when height of the content is bigger than max constraints allow.

Scope: Any

Configure touch scrolling and flinging for the UI element in both XY orientations.

Scope: Any

Configure a component to act as a scrollable area.

Scope: Any

Configure a component to act as a scrollable area.

Scope: Any

Configure touch scrolling and flinging for the UI element in a single Orientation.

Scope: Any

Configure touch scrolling and flinging for the UI element in a single Orientation.

Scope: Any

A visual-only scrollbar that represents the current scroll position of a scrolling component.

Scope: Any

Controls the soft keyboard as a nested scrolling on Android R and later.

Scope: Any

Semantics

Contains the semantics required for an indeterminate progress indicator, that represents the fact of the in-progress operation.

Scope: Any

Contains the semantics required for a determinate progress indicator or the progress part of a slider, that represents progress within valueRange.

Scope: Any

Clears the semantics of all the descendant nodes and sets new semantics.

Scope: Any

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

Scope: Any

Size

This modifier animates its own size when its child modifier (or the child composable if it is already at the tail of the chain) changes size.

Scope: Any

This modifier animates its own size when its child modifier (or the child composable if it is already at the tail of the chain) changes size.

Scope: Any

Attempts to size the content to match a specified aspect ratio by trying to match one of the incoming constraints in the following order: Constraints.maxWidth, Constraints.maxHeight, Constraints.minWidth, Constraints.minHeight if matchHeightConstraintsFirst is false (which is the default), or Constraints.maxHeight, Constraints.maxWidth, Constraints.minHeight, Constraints.minWidth if matchHeightConstraintsFirst is true.

Scope: Any

Reserves at least 48.dp in size to disambiguate touch interactions if the element would measure smaller.

Scope: Any

Declare the preferred height of the content to be the same as the min or max intrinsic height of the content.

Scope: Any

Declare the height of the content to be exactly the same as the min or max intrinsic height of the content.

Scope: Any

Declare the width of the content to be exactly the same as the min or max intrinsic width of the content.

Scope: Any

Declare the preferred width of the content to be the same as the min or max intrinsic width of the content.

Scope: Any

Invoked with the size of the modified Compose UI element when the element is first measured or when the size of the element changes.

Scope: Any

Constrain the size of the wrapped layout only when it would be otherwise unconstrained: the minWidth and minHeight constraints are only applied when the incoming corresponding constraint is 0.

Scope: Any

Have the content fill (possibly only partially) the Constraints.maxHeight of the incoming measurement constraints, by setting the minimum height and the maximum height to be equal to the maximum height multiplied by fraction.

Scope: Any

Have the content fill (possibly only partially) the Constraints.maxWidth and Constraints.maxHeight of the incoming measurement constraints, by setting the minimum width and the maximum width to be equal to the maximum width multiplied by fraction, as well as the minimum height and the maximum height to be equal to the maximum height multiplied by fraction.

Scope: Any

Have the content fill (possibly only partially) the Constraints.maxWidth of the incoming measurement constraints, by setting the minimum width and the maximum width to be equal to the maximum width multiplied by fraction.

Scope: Any

Declare the preferred height of the content to be exactly heightdp.

Scope: Any

Constrain the height of the content to be between mindp and maxdp as permitted by the incoming measurement Constraints.

Scope: Any

Declare the height of the content to be exactly heightdp.

Scope: Any

Constrain the height of the content to be between mindp and maxdp.

Scope: Any

Declare the size of the content to be exactly sizedp width and height.

Scope: Any

Declare the size of the content to be exactly size.

Scope: Any

Declare the size of the content to be exactly widthdp and heightdp.

Scope: Any

Constrain the width of the content to be between minWidthdp and maxWidthdp, and the height of the content to be between minHeightdp and maxHeightdp.

Scope: Any

Declare the width of the content to be exactly widthdp.

Scope: Any

Constrain the width of the content to be between mindp and maxdp.

Scope: Any

Declare the preferred size of the content to be exactly sizedp square.

Scope: Any

Declare the preferred size of the content to be exactly size.

Scope: Any

Declare the preferred size of the content to be exactly widthdp by heightdp.

Scope: Any

Constrain the width of the content to be between minWidthdp and maxWidthdp and the height of the content to be between minHeightdp and maxHeightdp as permitted by the incoming measurement Constraints.

Scope: Any

Declare the preferred width of the content to be exactly widthdp.

Scope: Any

Constrain the width of the content to be between mindp and maxdp as permitted by the incoming measurement Constraints.

Scope: Any

Allow the content to measure at its desired height without regard for the incoming measurement minimum height constraint, and, if unbounded is true, also without regard for the incoming measurement maximum height constraint.

Scope: Any

Allow the content to measure at its desired size without regard for the incoming measurement minimum width or minimum height constraints, and, if unbounded is true, also without regard for the incoming maximum constraints.

Scope: Any

Allow the content to measure at its desired width without regard for the incoming measurement minimum width constraint, and, if unbounded is true, also without regard for the incoming measurement maximum width constraint.

Scope: Any

Sets the height to that of insets at the bottom of the screen.

Scope: Any

Sets the width to that of insets at the end of the screen, using either left or right, depending on the LayoutDirection.

Scope: Any

Sets the width to that of insets at the start of the screen, using either left or right, depending on the LayoutDirection.

Scope: Any

Sets the height to that of insets at the top of the screen.

Scope: Any

Attempts to size the original content rectangle to be inscribed into a destination by applying a specified ContentScale type.

Scope: Any

skipToLookaheadSize enables a layout to measure its child with the lookahead constraints, therefore laying out the child as if the transition has finished.

Size the element's width proportional to its weight relative to other weighted sibling elements in the Row.

Scope: RowScope

Size the element's height proportional to its weight relative to other weighted sibling elements in the Column.

Have the item fill (possibly only partially) the max height of the tallest item in the row it was placed in, within the FlowRow.

Have the item fill (possibly only partially) the max width of the widest item in the column it was placed in, within the FlowColumn.

Size the element to match the size of the Box after all other content elements have been measured.

Scope: BoxScope

Have the content fill the Constraints.maxHeight of the incoming measurement constraints by setting the minimum height to be equal to the maximum height multiplied by fraction.

Have the content fill the Constraints.maxWidth and Constraints.maxHeight of the parent measurement constraints by setting the minimum width to be equal to the maximum width multiplied by fraction and the minimum height to be equal to the maximum height multiplied by fraction.

Have the content fill the Constraints.maxWidth of the parent measurement constraints by setting the minimum width to be equal to the maximum width multiplied by fraction.

Modifier which should be applied to a menu placed inside the ExposedDropdownMenuBoxScope.

abstract

This modifier specifies the preferred height for a pane in Dps, and the pane scaffold implementation will try its best to respect this height when the associated pane is rendered as a reflowed or a levitated pane.

This modifier specifies the preferred height for a pane as a proportion of the overall scaffold height.

This modifier specifies the preferred width for a pane as a proportion of the overall scaffold width.

This modifier specifies the preferred width for a pane in Dps, and the pane scaffold implementation will try its best to respect this width when the associated pane is rendered as a fixed pane, i.e., a pane that are not stretching to fill the remaining spaces.

Testing

Applies a tag to allow modified element to be found in tests.

Scope: Any

Transformations

Sets the degrees the view is rotated around the center of the composable.

Scope: Any

Scale the contents of both the horizontal and vertical axis uniformly by the same scale factor.

Scope: Any

Scale the contents of the composable by the following scale factors along the horizontal and vertical axis respectively.

Scope: Any

Enable transformation gestures of the modified UI element.

Scope: Any

Enable transformation gestures of the modified UI element.

Scope: Any