SkillAgentSearch skills...

ShowcaseLayoutCompose

Showcase Layout allows you to easily showcase and explain Compose UI elements to users works on Android, IOS, Desktop and Web.

Install / Use

/learn @tahaak67/ShowcaseLayoutCompose

README

Maven Central GitHub issues GitHub stars GitHub license Compose Multiplatform badge-android badge-ios badge-desktop badge-web

Showcase Layout Compose

Create beautiful animated showcase effects for your compose UIs easily!

Now with multiplatform support and two different showcase layouts to choose from:

  • ShowcaseLayout: Classic full-screen overlay with cutouts
  • TargetShowcaseLayout: Modern targeted highlighting with customizable shapes

Web demo

Click here to try showcase layout for web in your browser!

Demo

| ShowcaseLayout | |:---------------------------------------------------------------------------:| | <img src="metadata/gif/slc-light.gif" alt="Library demo GIF" width="300" /> |

https://github.com/user-attachments/assets/faa5dc19-606a-4731-80b1-44cbf6d08fdc

<img src="metadata/screenshots/screenshot-13.png" alt="Library demo GIF" width="300" />.<img src="metadata/screenshots/screenshot-14.png" alt="Library demo GIF" width="300" />

Setup

Showcase Layout Compose can be used in both Jetpack Compose (native Android) or Compose Multiplatform (Kotlin Multiplatform) projects.

Compose multiplatform support starts at version 1.0.5-alpha-8 and up.

Add the dependency to your module's build.gradle file like below

implementation("ly.com.tahaben:showcase-layout-compose:1.0.9")

Usage

Step 1

Create a ShowcaseLayout and make it the root composable (put all screen composables inside it)

    var isShowcasing by remember {
    mutableStateOf(true)
}
ShowcaseLayout(
    isShowcasing = isShowcasing,
    onFinish = { isShowcasing = false }
) {
    // screen content here
    Column(
        modifier = Modifier
            .fillMaxSize()
    ) {
        Text(text = "ShowcaseLayout Test 1")
        Spacer(modifier = Modifier.height(16.dp))
        Text(text = "ShowcaseLayout Test 2")
        Spacer(modifier = Modifier.height(16.dp))
        Text(text = "ShowcaseLayout Test 3")
    }
}

Step 2

In composables you want to showcase on the modifier use Modifier.showcase(), Lets say we want to showcase the first text "ShowcaseLayout Test 1"


Text(
    modifier = Modifier.showcase(
        // should start with 1 and increment with 1 for each time you use Modifier.showcase()
        index = 1,
        message = ShowcaseMsg(
            "This is a showcase message",
            textStyle = TextStyle(color = Color.White)
        )
    ),
    text = "ShowcaseLayout Test 1"
)

you also use the old method by wrap the composables you want to showcase with Showcase()

Step 3

You have 2 ways of showcasing, showcase everything subsequently or showcasing each item manually

<details> <summary> <b> Showcase all items subsequently</b> </summary> Start showcasing by making <code>isShowcasing = true</code>, and stop showcasing by making it false above we stop showcasing after we showcase the last item using `onFinished` which is called whenever all items are showcased, </details> <details> <summary> <b>Showcase a single item (1.0.5 and up)</b> </summary> After you attach the index and showcase message to your components you can simply call <code>showcaseItem(i)</code> where i is the index of the item you want to showcase
    val coroutineScope = rememberCoroutineScope()

    coroutineScope.launch{
        showcaseItem(1)
    }

similarly you can show a greeting using <code>showGreeting</code> and passing the message

    val coroutineScope = rememberCoroutineScope()

    coroutineScope.launch{
        showGreeting(
            ShowcaseMsg(
            text = "I like compose bro <3",
            textStyle = TextStyle(color = Color.White)
            )
        )
    }
</details>

Done, our text is now showcased!, customize it further with Additional parameters.

TargetShowcaseLayout (New!)

Starting from version 1.0.6, Showcase Layout Compose now offers a new layout option: TargetShowcaseLayout. This layout provides a different visual approach to showcasing UI elements by highlighting specific targets with customizable shapes rather than the full-screen approach of the original ShowcaseLayout.

Key Features

  • Highlights target elements with customizable shapes (circle, rectangle, or rounded rectangle)
  • Smooth animations between targets
  • Pulsing effect around the target for better visibility
  • All the same customization options as the original ShowcaseLayout

Usage

You can use TargetShowcaseLayout directly:

var isShowcasing by remember { mutableStateOf(true) }

TargetShowcaseLayout(
    isShowcasing = isShowcasing,
    onFinish = { isShowcasing = false },
    targetShape = TargetShape.ROUNDED_RECTANGLE, // CIRCLE, RECTANGLE, or ROUNDED_RECTANGLE
    cornerRadius = 8.dp, // Only used with ROUNDED_RECTANGLE
    animateToNextTarget = true, // Smooth animation between targets
    greeting = ShowcaseMsg(
        "Welcome to TargetShowcaseLayout!",
        textStyle = TextStyle(color = Color.White)
    )
) {
    // Your UI content here
    Column {
        Text(
            modifier = Modifier.showcase(
                index = 1,
                message = ShowcaseMsg(
                    "This element is highlighted with TargetShowcaseLayout",
                    textStyle = TextStyle(color = Color.White)
                )
            ),
            text = "Target Showcase Example"
        )
    }
}

| TargetShowcaseLayout with CIRCLE shape | TargetShowcaseLayout with RECTANGLE shape | TargetShowcaseLayout with ROUNDED_RECTANGLE shape | |:------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------:| | screenshot-targetshocase-circle.png | screenshot-targetshocase-rect.png | screenshot-targetshocase-roundrect.png |

TargetShowcaseLayout vs ShowcaseLayout

| Feature | TargetShowcaseLayout | ShowcaseLayout | |---------|---------------------|----------------| | Visual style | Highlights specific targets with shapes | Full-screen overlay with cutouts | | Target shapes | Circle, Rectangle, Rounded Rectangle | Circle, Rectangle, Rounded Rectangle | | Animations | Smooth transitions between targets | Fade transitions | | Pulsing effect | Yes | No | | Use cases | Focused UI tours, precise element highlighting | General app tours, feature introductions |

TargetShowcaseLayout Parameters

In addition to the parameters shared with ShowcaseLayout, TargetShowcaseLayout offers:

TargetShowcaseLayout(
    // Common parameters (same as ShowcaseLayout)
    isShowcasing = isShowcasing,
    isDarkLayout = false,
    initIndex = 0,
    animationDuration = 1000,
    onFinish = { isShowcasing = false },
    greeting = ShowcaseMsg(
        "Welcome to TargetShowcaseLayout!",
        textStyle = TextStyle(color = Color.White)
    ),
    lineThickness = 5.dp,

    // TargetShowcaseLayout specific parameters
    targetShape = TargetShape.CIRCLE, // CIRCLE, RECTANGLE, or ROUNDED_RECTANGLE
    cornerRadius = 8.dp, // Only used with ROUNDED_RECTANGLE
    animateToNextTarget = true // Smooth animation between targets, otherwise shrink and expand on each target
) {
    // Your UI content here
}
<!-- SCREENSHOT PLACEHOLDER: Add a side-by-side comparison of the same UI with both layouts -->

Additional parameters

isDarkLayout

Makes the showcase view white instead of black (useful for dark UI).

ShowcaseLayout(
    isShowcasing = isShowcasing,
    onFinish = { isShowcasing = false },
    isDarkLayout = isSystemInDarkTheme()
)
<p align="center"> isDarkLayout = true <br/> <img src="metadata/screenshots/screenshot-4.png" alt="Screenshot" height="530" width="250" /> <img src="metadata/screenshots/screenshot-5.png" alt="Dark layout example 1" height="530" width="250" /> </p>

greeting

A customizable greeting message of type showcaseMsg()


ShowcaseLayout(
    isShowcasing = isShowcasing,
    onFinish = { isShowcasing = false },
    isDarkLayout = isSystemInDarkTheme(),
    greeting = ShowcaseMsg(
        "Welcome to my app, lets take you on a quick tour!, tap anywhere to continue",
        textStyle = TextStyle(color = Color.White)
    )
)

<p align="center"> <img src="metadata/screenshots/screenshot-7.jpg" alt="Greeting msg example" width="250" /> </p>

initIndex

the initial value of what index will showcase first.

animationDuration

total animation time taken when switching from cu

Related Skills

View on GitHub
GitHub Stars113
CategoryDevelopment
Updated2d ago
Forks5

Languages

Kotlin

Security Score

100/100

Audited on Apr 1, 2026

No findings