---
title: "DelegatableNode"
description: "Represents a [Modifier.Node] which can be a delegate of another [Modifier.Node]. Since
[Modifier.Node] implements this interface, in practice any [Modifier.Node] can be delegated."
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>



```kotlin
interface DelegatableNode
```


Represents a `Modifier.Node` which can be a delegate of another `Modifier.Node`. Since
`Modifier.Node` implements this interface, in practice any `Modifier.Node` can be delegated.


## Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val node: Modifier.Node
```


A reference of the `Modifier.Node` that holds this node's position in the node hierarchy. If
the node is a delegate of another node, this will point to the root delegating node that is
actually part of the node tree. Otherwise, this will point to itself.



## Functions

```kotlin
fun onDensityChange()
```


Invoked when the density changes for this node. This affects Dp to pixel conversions, and can
cause coordinates / other values to change.

Changes to density will automatically invalidate layout / draw modifiers, as layout,
measurement, and draw depend on density. This callback can be used to update any other node
state that depends on density, outside of these phases. Density can be retrieved inside a
node by using `androidx.compose.ui.node.requireDensity`.


```kotlin
fun onLayoutDirectionChange()
```


Invoked when the layout direction changes for this node. This can affect the layout and
drawing of nodes.

Changes to layout direction will automatically invalidate layout / draw modifiers, as layout,
measurement, and draw depend on layout direction. This callback can be used to update any
other node state that depends on layout direction, outside of these phases. Layout direction
can be retrieved inside a node by using `androidx.compose.ui.node.requireLayoutDirection`.



