# Sharing Shared Element Keys

DevFeed: [Sharing Shared Element Keys](<https://devfeed.tech/articles/sharing-shared-element-keys-22835.md>)

Original publisher: [Read original article](<http://androidessence.com/sharing-shared-element-keys/>)

Author: Adam McNeilly

Published: 2025-08-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Android Essence](<https://devfeed.tech/sources/android-essence.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [model](<https://devfeed.tech/tags/model.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

This tutorial explains how to keep shared element keys consistent across Compose screens by defining them on UI-specific DisplayModels. The approach centralizes animation-related keys and separates domain data from UI representation, while also supporting testability.

## Source excerpt

Shared Element Transitions are a fantastic way to add visual flair to your applications. They allow us to animate content between two separate screens. One complication is sharing keys for these components across different screens in a consistent manner. Let's explore one simple option.