We already know what their target values should be, so we can wrap the values like below. Note that we can use a by declaration and make it a local delegated property here again because the animate* functions return a State object. val transition = updateTransition(tabPage, label = "Tab indicator") val indicatorLeft by transition.animateDp(label = "Indicator left") {page -> tabPositions[page.ordinal].left} val indicatorRight by transition.animateDp(label = "Indicator right") {page -> tabPositions[page.ordinal].right} val color by transition.animateColor(label = "Border color") {page -> if (page == TabPage.Home) Purple700 else Green800}